|
|||||||||
Home >> All >> javax >> swing >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
javax.swing.text
Class StyledEditorKit.StyledTextAction

java.lang.Objectjavax.swing.AbstractAction
javax.swing.text.TextAction
javax.swing.text.StyledEditorKit.StyledTextAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
- Direct Known Subclasses:
- StyledEditorKit.AlignmentAction, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.UnderlineAction
- Enclosing class:
- StyledEditorKit
- public abstract static class StyledEditorKit.StyledTextAction
- extends TextAction
The abstract superclass of all styled TextActions. This class provides some useful methods to manipulate the text attributes.
Field Summary |
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
StyledEditorKit.StyledTextAction(java.lang.String nm)
Creates a new instance of StyledTextAction . |
Method Summary | |
protected javax.swing.JEditorPane |
getEditor(java.awt.event.ActionEvent event)
Returns the JEditorPane component from which the
ActionEvent originated. |
protected StyledDocument |
getStyledDocument(javax.swing.JEditorPane editor)
Returns the StyledDocument that is used by editor . |
protected StyledEditorKit |
getStyledEditorKit(javax.swing.JEditorPane editor)
Returns the StyledEditorKit that is used by editor . |
protected void |
setCharacterAttributes(javax.swing.JEditorPane editor,
AttributeSet atts,
boolean replace)
Sets the specified character attributes on the currently selected text of editor . |
protected void |
setParagraphAttributes(javax.swing.JEditorPane editor,
AttributeSet atts,
boolean replace)
Sets the specified character attributes on the paragraph that contains the currently selected text of editor . |
Methods inherited from class javax.swing.text.TextAction |
augmentList, getFocusedComponent, getTextComponent |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.ActionListener |
actionPerformed |
Constructor Detail |
StyledEditorKit.StyledTextAction
public StyledEditorKit.StyledTextAction(java.lang.String nm)
- Creates a new instance of
StyledTextAction
.
Method Detail |
getEditor
protected final javax.swing.JEditorPane getEditor(java.awt.event.ActionEvent event)
- Returns the
JEditorPane
component from which theActionEvent
originated.
setCharacterAttributes
protected final void setCharacterAttributes(javax.swing.JEditorPane editor, AttributeSet atts, boolean replace)
- Sets the specified character attributes on the currently selected
text of
editor
. Ifeditor
does not have a selection, then the attributes are used as input attributes for newly inserted content.
getStyledDocument
protected final StyledDocument getStyledDocument(javax.swing.JEditorPane editor)
- Returns the StyledDocument that is used by
editor
.
getStyledEditorKit
protected final StyledEditorKit getStyledEditorKit(javax.swing.JEditorPane editor)
- Returns the StyledEditorKit that is used by
editor
.
setParagraphAttributes
protected final void setParagraphAttributes(javax.swing.JEditorPane editor, AttributeSet atts, boolean replace)
- Sets the specified character attributes on the paragraph that
contains the currently selected
text of
editor
. Ifeditor
does not have a selection, then the attributes are set on the paragraph that contains the current caret position.
|
|||||||||
Home >> All >> javax >> swing >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |