public abstract class TextAction extends AbstractAction
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
TextAction(String name)
Constructor TextAction
|
Modifier and Type | Method and Description |
---|---|
static Action[] |
augmentList(Action[] list1,
Action[] list2)
Creates a new array of
Action containing both given arrays. |
protected JTextComponent |
getFocusedComponent()
Returns the current focused
JTextComponent object. |
protected JTextComponent |
getTextComponent(ActionEvent event)
Returns the
JTextComponent object associated with the given
ActionEvent . |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
actionPerformed
public TextAction(String name)
name
- TODOprotected final JTextComponent getTextComponent(ActionEvent event)
JTextComponent
object associated with the given
ActionEvent
. If the source of the event is not a
JTextComponent
the currently focused text component is returned.event
- the action eventJTextComponent
public static final Action[] augmentList(Action[] list1, Action[] list2)
Action
containing both given arrays.list1
- the first action arraylist2
- the second action arrayprotected final JTextComponent getFocusedComponent()
JTextComponent
object.JTextComponent