当前页面:
在线文档首页 >
NetBeans API Javadoc 5.5.0
FilterStyledDocument (NetBeans Text API) - NetBeans API Javadoc 5.5.0
org.openide.text
Class FilterStyledDocument
java.lang.Object
org.openide.text.FilterDocument
org.openide.text.FilterStyledDocument
- All Implemented Interfaces:
- Document, StyledDocument
public class FilterStyledDocument
- extends FilterDocument
Document that delegates all functionality to a given 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.
| Methods inherited from class org.openide.text.FilterDocument |
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterStyledDocument
public FilterStyledDocument(StyledDocument original)
- Create new document instance.
- Parameters:
original - the delegated-to styled document
addStyle
public Style addStyle(String nm,
Style parent)
- Specified by:
addStyle in interface StyledDocument- Overrides:
addStyle in class FilterDocument
removeStyle
public void removeStyle(String nm)
- Specified by:
removeStyle in interface StyledDocument- Overrides:
removeStyle in class FilterDocument
getStyle
public Style getStyle(String nm)
- Specified by:
getStyle in interface StyledDocument- Overrides:
getStyle in class FilterDocument
setCharacterAttributes
public void setCharacterAttributes(int offset,
int length,
AttributeSet s,
boolean replace)
- Specified by:
setCharacterAttributes in interface StyledDocument- Overrides:
setCharacterAttributes in class FilterDocument
setParagraphAttributes
public void setParagraphAttributes(int offset,
int length,
AttributeSet s,
boolean replace)
- Specified by:
setParagraphAttributes in interface StyledDocument- Overrides:
setParagraphAttributes in class FilterDocument
setLogicalStyle
public void setLogicalStyle(int pos,
Style s)
- Specified by:
setLogicalStyle in interface StyledDocument- Overrides:
setLogicalStyle in class FilterDocument
getLogicalStyle
public Style getLogicalStyle(int p)
- Specified by:
getLogicalStyle in interface StyledDocument- Overrides:
getLogicalStyle in class FilterDocument
getParagraphElement
public Element getParagraphElement(int pos)
- Specified by:
getParagraphElement in interface StyledDocument- Overrides:
getParagraphElement in class FilterDocument
getCharacterElement
public Element getCharacterElement(int pos)
- Specified by:
getCharacterElement in interface StyledDocument- Overrides:
getCharacterElement in class FilterDocument
getForeground
public Color getForeground(AttributeSet attr)
- Specified by:
getForeground in interface StyledDocument- Overrides:
getForeground in class FilterDocument
getBackground
public Color getBackground(AttributeSet attr)
- Specified by:
getBackground in interface StyledDocument- Overrides:
getBackground in class FilterDocument
getFont
public Font getFont(AttributeSet attr)
- Specified by:
getFont in interface StyledDocument- Overrides:
getFont in class FilterDocument