javax.swing.text
Class TextAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Direct Known Subclasses:
- DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction, StyledEditorKit.StyledTextAction
public abstract class TextAction
- extends AbstractAction
TextAction
- See Also:
- Serialized Form
TextAction
public TextAction(String name)
- Constructor TextAction
- Parameters:
name
- TODO
getTextComponent
protected final JTextComponent getTextComponent(ActionEvent event)
- Returns the
JTextComponent
object associated with the given
ActionEvent
. If the source of the event is not a
JTextComponent
the currently focused text component is returned.
- Parameters:
event
- the action event
- Returns:
- the
JTextComponent
augmentList
public static final Action[] augmentList(Action[] list1,
Action[] list2)
- Creates a new array of
Action
containing both given arrays.
- Parameters:
list1
- the first action arraylist2
- the second action array
- Returns:
- the augmented array of actions
getFocusedComponent
protected final JTextComponent getFocusedComponent()
- Returns the current focused
JTextComponent
object.
- Returns:
- the
JTextComponent