Java javax.swing.text StyledDocument fields, constructors, methods, implement or subclass

Example usage for Java javax.swing.text StyledDocument fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing.text StyledDocument.

The text is from its open source code.

Implementation

javax.swing.text.StyledDocument has the following implementations.
Click this link to see all its implementation.

Method

StyleaddStyle(String nm, Style parent)
Adds a new style into the logical style hierarchy.
ElementgetCharacterElement(int pos)
Gets the element that represents the character that is at the given offset within the document.
ColorgetForeground(AttributeSet attr)
Takes a set of attributes and turn it into a foreground color specification.
intgetLength()
Returns number of characters of content currently in the document.
ElementgetParagraphElement(int pos)
Gets the element that represents the paragraph that encloses the given offset within the document.
Element[]getRootElements()
Returns all of the root elements that are defined.
StylegetStyle(String nm)
Fetches a named style previously added.
StringgetText(int offset, int length)
Fetches the text contained within the given portion of the document.
voidinsertString(int offset, String str, AttributeSet a)
Inserts a string of content.
voidputProperty(Object key, Object value)
Associates a property with the document.
voidremove(int offs, int len)
Removes a portion of the content of the document.
voidsetCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
Changes the content element attributes used for the given range of existing content in the document.
voidsetLogicalStyle(int pos, Style s)
Sets the logical style to use for the paragraph at the given position.
voidsetParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
Sets paragraph attributes.