|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||||||
| JavaTM 2 Platform Std. Ed. v1.6.0
javax.swing.text
|
|||||||||||||||||||||||||||||||
| Field Summary |
|---|
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
StyledEditorKit.StyledTextAction(String nm)
Creates a new StyledTextAction from a string action name. |
|
| Method Summary | |
|---|---|
protected JEditorPane |
getEditor(ActionEvent e)
Gets the target editor for an action. |
protected StyledDocument |
getStyledDocument(JEditorPane e)
Gets the document associated with an editor pane. |
protected StyledEditorKit |
getStyledEditorKit(JEditorPane e)
Gets the editor kit associated with an editor pane. |
protected void |
setCharacterAttributes(JEditorPane editor,
AttributeSet attr,
boolean replace)
Applies the given attributes to character content. |
protected void |
setParagraphAttributes(JEditorPane editor,
AttributeSet attr,
boolean replace)
Applies the given attributes to paragraphs. |
| 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 |
|---|
public StyledEditorKit.StyledTextAction(String nm)
nm - the name of the action| Method Detail |
|---|
protected final JEditorPane getEditor(ActionEvent e)
e - the action event
protected final StyledDocument getStyledDocument(JEditorPane e)
e - the editor
IllegalArgumentException - for the wrong document typeprotected final StyledEditorKit getStyledEditorKit(JEditorPane e)
e - the editor pane
IllegalArgumentException - for the wrong document typeprotected final void setCharacterAttributes(JEditorPane editor, AttributeSet attr, boolean replace)
editor - the editorattr - the attributesreplace - if true, then replace the existing attributes firstprotected final void setParagraphAttributes(JEditorPane editor, AttributeSet attr, boolean replace)
editor - the editorattr - the attributesreplace - if true, replace the existing attributes first