|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jsxe.ActionManager
The ActionManager handles key bindings within jsXe. Key bindings can be set editor wide via the shortcuts option pane in the global options dialog.
While most actions are editor wide, some are editor wide but the implementations are view specific. These include Cut/Copy/Paste/Find which are common among different views thought their implementation will be provided by the view. These actions will be named using the format viewname.actionname (ex. treeview.cut). these special actions will have a single key binding associated with them but when invoked will activate view specific code provided by the plugin.
Nested Class Summary | |
static class |
ActionManager.Wrapper
The Wrapper class wraps LocalizedActions so they can be invoked through Swing via the ActionListener interface. |
Field Summary | |
static String |
COPY_SUFFIX
|
static String |
CUT_SUFFIX
|
static String |
FIND_SUFFIX
|
static String |
PASTE_SUFFIX
|
Method Summary | |
static void |
addActionSet(ActionSet set)
Adds a set of actions to the jsXe's pool of action sets. |
static void |
addKeyBinding(String keyBinding,
LocalizedAction action)
Adds a key binding to this input handler. |
static void |
addKeyBinding(String keyBinding,
String action)
Adds a key binding to jsXe. |
static Action |
getAction(String name)
Gets a true action for the LocalizedAction with the given name. |
static ArrayList |
getActionSets()
Gets all action sets that have been registered with jsXe |
static LocalizedAction |
getLocalizedAction(String name)
Gets the LocalizedAction set with the given name |
static void |
handleKey(KeyEvent event)
Handles a key event. |
static void |
initKeyBindings()
Initialized the key bindings for jsXe. |
static void |
invokeAction(String name,
ActionEvent evt)
Invokes the action with the given name. |
static boolean |
isDocViewSpecific(String actionName)
Returns whether the action with the given name is document view specific. |
static void |
removeAllKeyBindings()
Removes all key bindings. |
static void |
removeKeyBinding(String keyBinding)
Removes a key binding. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String CUT_SUFFIX
public static final String COPY_SUFFIX
public static final String PASTE_SUFFIX
public static final String FIND_SUFFIX
Method Detail |
public static void addActionSet(ActionSet set)
set
- the action set to addpublic static LocalizedAction getLocalizedAction(String name)
public static Action getAction(String name)
name
- the name of the action.public static ArrayList getActionSets()
public static void invokeAction(String name, ActionEvent evt)
name
- the internal name of the actionpublic static void initKeyBindings()
public static void addKeyBinding(String keyBinding, String action)
keyBinding
- The key bindingaction
- The action namepublic static void addKeyBinding(String keyBinding, LocalizedAction action)
keyBinding
- The key binding. It should be of the form described
in KeyEventTranslator
action
- The actionpublic static void removeKeyBinding(String keyBinding)
keyBinding
- The key bindingpublic static void removeAllKeyBindings()
public static void handleKey(KeyEvent event)
public static boolean isDocViewSpecific(String actionName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |