All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.text.JTextAction

java.lang.Object
   |
   +----com.sun.java.swing.JAction
           |
           +----com.sun.java.swing.text.JTextAction

public class JTextAction
extends JAction
An Action implementation useful for key bindings that are shared across a number of different text components. These must be used in conjunction with a JTextController which arranges to share information with JTextAction's such as which JTextComponent currently has focus.


Constructor Index

 o JTextAction(String)

Method Index

 o augmentList(Action[], Action[])
Convenience function to take one list of commands and augment it with another list of commands.
 o getFocusedComponent()
Fetch the text component that currently has focus.
 o getKeySequence()
Fetch the string that represents the key-sequence that was typed to cause the action to be invoked.

Constructors

 o JTextAction
 public JTextAction(String name)

Methods

 o augmentList
 public static final Action[] augmentList(Action list1[],
                                          Action list2[])
Convenience function to take one list of commands and augment it with another list of commands. The second list is considered to be higher priority than the first list and commands with the same name will both lists will only have the dominate command found in the second list in the returned list.

 o getFocusedComponent
 protected JTextComponent getFocusedComponent()
Fetch the text component that currently has focus. This allows actions to be shared across text components which is useful for key-bindings where a large set of actions are defined, but generally used the same way across many different components.

 o getKeySequence
 protected JKeyStroke[] getKeySequence()
Fetch the string that represents the key-sequence that was typed to cause the action to be invoked. This is useful for things like text insertion commands where one Action can serve a large number of key-bindings.


All Packages  Class Hierarchy  This Package  Previous  Next  Index