| Package | Description |
|---|---|
| javax.swing |
Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
|
| javax.swing.text |
Provides classes and interfaces that deal with editable and noneditable text components.
|
| javax.swing.text.html |
Provides the class
HTMLEditorKit and supporting classes for creating HTML text editors.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
JTextPane.addStyle(String
Adds a new style into the logical style hierarchy.
|
Style |
JTextPane.getLogicalStyle()
Fetches the logical style assigned to the paragraph represented by the current position of the caret, or
null.
|
Style |
JTextPane.getStyle(String
Fetches a named non-
null style previously added.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
JTextPane.addStyle(String
Adds a new style into the logical style hierarchy.
|
void |
JTextPane.setLogicalStyle(Style
Sets the logical style to use for the paragraph at the current caret position.
|
| Modifier and Type | Class and Description |
|---|---|
class |
StyleContext
A collection of attributes, typically used to represent character and paragraph styles.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
StyleContext.addStyle(String
Adds a new style into the style hierarchy.
|
Style |
DefaultStyledDocument.addStyle(String
Adds a new style into the logical style hierarchy.
|
Style |
StyledDocument.addStyle(String
Adds a new style into the logical style hierarchy.
|
Style |
DefaultStyledDocument.getLogicalStyle(int p)
Fetches the logical style assigned to the paragraph represented by the given position.
|
Style |
StyledDocument.getLogicalStyle(int p)
Gets a logical style for a given position in a paragraph.
|
Style |
StyleContext.getStyle(String
Fetches a named style previously added to the document
|
Style |
DefaultStyledDocument.getStyle(String
Fetches a named style previously added.
|
Style |
StyledDocument.getStyle(String
Fetches a named style previously added.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
StyleContext.addStyle(String
Adds a new style into the style hierarchy.
|
Style |
DefaultStyledDocument.addStyle(String
Adds a new style into the logical style hierarchy.
|
Style |
StyledDocument.addStyle(String
Adds a new style into the logical style hierarchy.
|
void |
DefaultStyledDocument.setLogicalStyle(int pos, Style
Sets the logical style to use for the paragraph at the given position.
|
void |
StyledDocument.setLogicalStyle(int pos, Style
Sets the logical style to use for the paragraph at the given position.
|
protected void |
DefaultStyledDocument.styleChanged(Style
Called when any of this document's styles have changed.
|
| Constructor and Description | |
|---|---|
NamedStyle(String
Creates a new named style.
|
|
NamedStyle(Style
Creates a new named style.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
StyleSheet.getRule(HTML
Fetches the style to use to render the given type of HTML tag.
|
Style |
StyleSheet.getRule(String
Fetches the rule that best matches the selector given in string form.
|