public class FilterDocument extends Object implements StyledDocument
StyledDocument
methods are just defaulted to the plainest behavior.
Modifier and Type | Field and Description |
---|---|
protected Document |
original
the original document to delegate to
|
StreamDescriptionProperty, TitleProperty
Constructor and Description |
---|
FilterDocument(Document original)
Create new document instance.
|
protected Document original
public FilterDocument(Document original)
original
- delegated-to documentpublic void addDocumentListener(DocumentListener l)
addDocumentListener
in interface Document
public void removeDocumentListener(DocumentListener l)
removeDocumentListener
in interface Document
public void addUndoableEditListener(UndoableEditListener listener)
addUndoableEditListener
in interface Document
public void removeUndoableEditListener(UndoableEditListener listener)
removeUndoableEditListener
in interface Document
public Object getProperty(Object key)
getProperty
in interface Document
public void putProperty(Object key, Object value)
putProperty
in interface Document
public void remove(int offset, int len) throws BadLocationException
remove
in interface Document
BadLocationException
public void insertString(int offset, String str, AttributeSet a) throws BadLocationException
insertString
in interface Document
BadLocationException
public String getText(int offset, int len) throws BadLocationException
getText
in interface Document
BadLocationException
public void getText(int offset, int len, Segment txt) throws BadLocationException
getText
in interface Document
BadLocationException
public Position getStartPosition()
getStartPosition
in interface Document
public Position getEndPosition()
getEndPosition
in interface Document
public Position createPosition(int offset) throws BadLocationException
createPosition
in interface Document
BadLocationException
public Element[] getRootElements()
getRootElements
in interface Document
public Element getDefaultRootElement()
getDefaultRootElement
in interface Document
public Style addStyle(String nm, Style parent)
addStyle
in interface StyledDocument
public void removeStyle(String nm)
removeStyle
in interface StyledDocument
public Style getStyle(String nm)
getStyle
in interface StyledDocument
public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
setCharacterAttributes
in interface StyledDocument
public void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
setParagraphAttributes
in interface StyledDocument
public void setLogicalStyle(int pos, Style s)
setLogicalStyle
in interface StyledDocument
public Style getLogicalStyle(int p)
getLogicalStyle
in interface StyledDocument
public Element getParagraphElement(int pos)
getParagraphElement
in interface StyledDocument
public Element getCharacterElement(int pos)
getCharacterElement
in interface StyledDocument
public Color getForeground(AttributeSet attr)
getForeground
in interface StyledDocument
public Color getBackground(AttributeSet attr)
getBackground
in interface StyledDocument
public Font getFont(AttributeSet attr)
getFont
in interface StyledDocument