API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text. StyledDocument View Source
Author(s)
Timothy Prinzing
Since
Version
1.22 11/17/05
Serial
Hierarchy
 Document
      StyledDocument
Subinterfaces
Description
public interface StyledDocument
Interface for a generic styled document.
See also:   
Methods
Hide/Show inherited methods
public Style addStyle (String nm, Style parent)
  Adds a new style into the logical style hierarchy.
public Color getBackground (AttributeSet attr)
  Takes a set of attributes and turn it into a background color specification.
public Element getCharacterElement (int pos)
  Gets the element that represents the character that is at the given offset within the document.
public Font getFont (AttributeSet attr)
  Takes a set of attributes and turn it into a font specification.
public Color getForeground (AttributeSet attr)
  Takes a set of attributes and turn it into a foreground color specification.
public Style getLogicalStyle (int p)
  Gets a logical style for a given position in a paragraph.
public Element getParagraphElement (int pos)
  Gets the element that represents the paragraph that encloses the given offset within the document.
public Style getStyle (String nm)
  Fetches a named style previously added.
public void removeStyle (String nm)
  Removes a named style previously added to the document.
public void setCharacterAttributes (int offset, int length, AttributeSet s, boolean replace)
  Changes the content element attributes used for the given range of existing content in the document.
public void setLogicalStyle (int pos, Style s)
  Sets the logical style to use for the paragraph at the given position.
public void setParagraphAttributes (int offset, int length, AttributeSet s, boolean replace)
  Sets paragraph attributes.
Fields
Hide/Show inherited fields
publicfinalstatic String StreamDescriptionProperty = "stream" [Inherited From Document]
  The property name for the description of the stream used to initialize the document.
publicfinalstatic String TitleProperty = "title" [Inherited From Document]
The property name for the title of the document, if there is one.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar