public class FilterStyledDocument extends FilterDocument
StyledDocument.
Useful if a subclass wants to modify the behaviour of a document.
Note that unlike FilterDocument, no methods are faked here, since a real styled document is available.
originalStreamDescriptionProperty, TitleProperty| Constructor and Description |
|---|
FilterStyledDocument(StyledDocument original)
Create new document instance.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
addStyle(String nm,
Style parent) |
Color |
getBackground(AttributeSet attr) |
Element |
getCharacterElement(int pos) |
Font |
getFont(AttributeSet attr) |
Color |
getForeground(AttributeSet attr) |
Style |
getLogicalStyle(int p) |
Element |
getParagraphElement(int pos) |
Style |
getStyle(String nm) |
void |
removeStyle(String nm) |
void |
setCharacterAttributes(int offset,
int length,
AttributeSet s,
boolean replace) |
void |
setLogicalStyle(int pos,
Style s) |
void |
setParagraphAttributes(int offset,
int length,
AttributeSet s,
boolean replace) |
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, renderpublic FilterStyledDocument(StyledDocument original)
original - the delegated-to styled documentpublic Style addStyle(String nm, Style parent)
addStyle in interface StyledDocumentaddStyle in class FilterDocumentpublic void removeStyle(String nm)
removeStyle in interface StyledDocumentremoveStyle in class FilterDocumentpublic Style getStyle(String nm)
getStyle in interface StyledDocumentgetStyle in class FilterDocumentpublic void setCharacterAttributes(int offset,
int length,
AttributeSet s,
boolean replace)
setCharacterAttributes in interface StyledDocumentsetCharacterAttributes in class FilterDocumentpublic void setParagraphAttributes(int offset,
int length,
AttributeSet s,
boolean replace)
setParagraphAttributes in interface StyledDocumentsetParagraphAttributes in class FilterDocumentpublic void setLogicalStyle(int pos,
Style s)
setLogicalStyle in interface StyledDocumentsetLogicalStyle in class FilterDocumentpublic Style getLogicalStyle(int p)
getLogicalStyle in interface StyledDocumentgetLogicalStyle in class FilterDocumentpublic Element getParagraphElement(int pos)
getParagraphElement in interface StyledDocumentgetParagraphElement in class FilterDocumentpublic Element getCharacterElement(int pos)
getCharacterElement in interface StyledDocumentgetCharacterElement in class FilterDocumentpublic Color getForeground(AttributeSet attr)
getForeground in interface StyledDocumentgetForeground in class FilterDocumentpublic Color getBackground(AttributeSet attr)
getBackground in interface StyledDocumentgetBackground in class FilterDocumentpublic Font getFont(AttributeSet attr)
getFont in interface StyledDocumentgetFont in class FilterDocumentBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.