javax.swing.text
public abstract static class StyledEditorKit.StyledTextAction extends TextAction
| Constructor Summary | |
|---|---|
| StyledTextAction(String nm)
Creates a new instance of StyledTextAction.
| |
| Method Summary | |
|---|---|
| protected JEditorPane | getEditor(ActionEvent event)
Returns the JEditorPane component from which the
ActionEvent originated.
|
| protected StyledDocument | getStyledDocument(JEditorPane editor)
Returns the {@link StyledDocument} that is used by editor.
|
| protected StyledEditorKit | getStyledEditorKit(JEditorPane editor)
Returns the {@link StyledEditorKit} that is used by editor.
|
| protected void | setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace)
Sets the specified character attributes on the currently selected
text of editor. |
| protected void | setParagraphAttributes(JEditorPane editor, AttributeSet atts, boolean replace)
Sets the specified character attributes on the paragraph that
contains the currently selected
text of editor. |
StyledTextAction.
Parameters: nm the name of the StyledTextAction
JEditorPane component from which the
ActionEvent originated.
Parameters: event the ActionEvent
Returns: the JEditorPane component from which the
ActionEvent originated
editor.
Parameters: editor the JEditorPane from which to get the
StyledDocument
Returns: the {@link StyledDocument} that is used by editor
editor.
Parameters: editor the JEditorPane from which to get the
StyledEditorKit
Returns: the {@link StyledEditorKit} that is used by editor
editor. If editor does not have
a selection, then the attributes are used as input attributes
for newly inserted content.
Parameters: editor the JEditorPane component atts the text attributes to set replace if true the current attributes of the
selection are replaces, otherwise they are merged
editor. If editor does not have
a selection, then the attributes are set on the paragraph that
contains the current caret position.
Parameters: editor the JEditorPane component atts the text attributes to set replace if true the current attributes of the
selection are replaces, otherwise they are merged