|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnap.gui.shortcut.ShortcutManager
public class ShortcutManager
Manages Shortcut objects.
| Method Summary | |
|---|---|
ActionShortcut |
add(javax.swing.Action action)
A convenience wrapper for add(Action, JComponent). |
ActionShortcut |
add(javax.swing.Action action,
javax.swing.JComponent c)
A convenience wrapper for add(Action, JComponent,
PreferencesProvider). |
ActionShortcut |
add(javax.swing.Action action,
javax.swing.JComponent c,
PreferencesProvider prefs)
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,
javax.swing.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(javax.swing.Action action,
javax.swing.JComponent c,
PreferencesProvider prefs)
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
registeredprefs - the preferences provider used for permantly storing the
actual key stroke value of the shortcut
public ActionShortcut add(javax.swing.Action action,
javax.swing.JComponent c)
add(Action, JComponent,
PreferencesProvider).
The PreferencesProvider defaults to
Preferences.getInstance()
public ActionShortcut add(javax.swing.Action action)
add(Action, JComponent).
The JComponent defaults to
XNapFrame.getInstance().getContentPane()
public Shortcut[] getShortcuts()
public void remove(Shortcut shortcut)
public void remove(ActionShortcut shortcut,
javax.swing.JComponent c)
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 | |||||||||