javax.swing.text
Interface StyledDocument

All Superinterfaces:
Document

 

All Known Implementing Classes

DefaultStyledDocument
public interface StyledDocument
extends Document

Interface for a generic styled document.

 

Field Summary

 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 

 

Method Summary

 Style addStyle(String nm, Style parent)
    Adds a new style into the logical style hierarchy.
 Color getBackground(AttributeSet attr)
    Takes a set of attributes and turn it into a background color specification.
 Element getCharacterElement(int pos)
    Gets the element that represents the character that is at the given offset within the document.
 Font getFont(AttributeSet attr)
    Takes a set of attributes and turn it into a font specification.
 Color getForeground(AttributeSet attr)
    Takes a set of attributes and turn it into a foreground color specification.
 Style getLogicalStyle(int p)
    Gets a logical style for a given position in a paragraph.
 Element getParagraphElement(int pos)
    Gets the element that represents the paragraph that encloses the given offset within the document.
 Style getStyle(String nm)
    Fetches a named style previously added.
 void removeStyle(String nm)
    Removes a named style previously added to the document.
 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.
 void setLogicalStyle(int pos, Style s)
    Sets the logical style to use for the paragraph at the given position.
 void setParagraphAttributes(int offset, int length, AttributeSet