|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.commons.gui.shortcut.ShortcutManager
public class ShortcutManager
Manages Shortcut objects.
Method Summary | |
---|---|
ActionShortcut |
add(Action action,
JComponent c)
Creates a new ActionShortcut for the action if there isn't already one and returns it. |
void |
add(Shortcut shortcut)
Adds a shortcut. |
static ShortcutManager |
getInstance()
Returns the instance of ShortcutManager . |
Shortcut[] |
getShortcuts()
Returns the array of currently registered shorcuts. |
void |
remove(ActionShortcut shortcut,
JComponent c)
Removes a component from a currently registered action shortcut. |
void |
remove(Shortcut shortcut)
Removes a currently registered shortcut. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ShortcutManager getInstance()
ShortcutManager
.
public void add(Shortcut shortcut)
public ActionShortcut add(Action action, JComponent c)
Only one action shortcut object can exist for the same preferences key. Additional components are all managed by the same action shortcut object.
action
- the action which should be performed when the shortcut is
typed in the respective componentc
- the component for which the shortcut and the action are
registeredpublic Shortcut[] getShortcuts()
public void remove(Shortcut shortcut)
public void remove(ActionShortcut shortcut, JComponent c)
If the action shortcut's component count ActionShortcut.getNumberOfComponents()
drops to 0, it is removed from
the shortcut manager.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |