站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.1

FilterStyledDocument (NetBeans Text API) - NetBeans API Javadoc 5.5.1

org.openide.text 6.9.32

org.openide.text
Class FilterStyledDocument

java.lang.Object
  extended by org.openide.text.FilterDocument
      extended by 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.


Field Summary
 
Fields inherited from class org.openide.text.FilterDocument
original
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
FilterStyledDocument(StyledDocument original)
          Create new document instance.
 
Method Summary
 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)
           
 
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
 

Constructor Detail

FilterStyledDocument

public FilterStyledDocument(StyledDocument original)
Create new document instance.

Parameters:
original - the delegated-to styled document
Method Detail

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

org.openide.text 6.9.32

Built on March 26 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.