|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.gui.shortcut.ActionShortcut
public class ActionShortcut
Provides an action based shortcut. The action has to provide several values to make use of the shortcut. It must provide the following values: Action.ACTION_COMMAND_KEY, the preferences key It should provide values for the following keys: AbstractXNapAction.DEFAULT_KEYSTROKE, the default KeyStroke AbstractXNapAction.SHORTCUT_CATEGORY, category used in the ShortcutsPrefsPanel
Constructor Summary | |
---|---|
ActionShortcut(javax.swing.Action action,
javax.swing.JComponent c,
PreferencesProvider prefs)
|
Method Summary | |
---|---|
void |
addComponent(javax.swing.JComponent c,
javax.swing.Action a)
Installs the action into the action map of the component and sets up the shortcut mapping. |
java.lang.String |
getCategory()
Returns the parent category. |
javax.swing.KeyStroke |
getDefaultKeyStroke()
Returns a keystroke. |
java.lang.String |
getDescription()
|
javax.swing.KeyStroke |
getKeyStroke()
Returns a keystroke. |
int |
getNumberOfComponents()
|
java.lang.String |
getPrefsKey()
|
void |
removeComponent(javax.swing.JComponent c)
Removes the action mapping from the given component and removes it from its list of components. |
void |
setKeyStroke(javax.swing.KeyStroke stroke)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActionShortcut(javax.swing.Action action, javax.swing.JComponent c, PreferencesProvider prefs)
Method Detail |
---|
public void addComponent(javax.swing.JComponent c, javax.swing.Action a)
public void removeComponent(javax.swing.JComponent c)
c
- the component this shortcuts is registered onpublic java.lang.String getPrefsKey()
public int getNumberOfComponents()
public java.lang.String getCategory()
Shortcut
getCategory
in interface Shortcut
Shortcut.getCategory()
public java.lang.String getDescription()
getDescription
in interface Shortcut
Shortcut.getDescription()
public javax.swing.KeyStroke getKeyStroke()
Shortcut
getKeyStroke
in interface Shortcut
org.xnap.gui.shortcut.Shortcut#getKeystroke()
public void setKeyStroke(javax.swing.KeyStroke stroke)
setKeyStroke
in interface Shortcut
org.xnap.gui.shortcut.Shortcut#setKeystroke(javax.swing.KeyStroke)
public javax.swing.KeyStroke getDefaultKeyStroke()
Shortcut
getDefaultKeyStroke
in interface Shortcut
Shortcut.getDefaultKeyStroke()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |