|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdevisor2.grid.options.Accelerators
This class maps the GUI representation of accelerator keys to the
Java object representation.
So, nothing spectacular here, just a long, boring multi-if-else-statement.
The application-wide accelerator settings are managed and saved in the
Options class. See there for details.
devisor2.options.Options
Constructor Summary | |
Accelerators()
|
Method Summary | |
static javax.swing.KeyStroke |
getAccelerator(java.lang.String accString)
Returns the Swing representation of the given (internal) string representing of an accelerator. |
static javax.swing.KeyStroke |
getAccelerator(java.lang.String modifier,
java.lang.String key)
Returns the Swing representation of the accelerator defined by modifier + key |
static int |
getKeyConstant(java.lang.String key)
returns the KEY_VK constant assigned to the given key |
static java.lang.String |
getKeyString(int key)
Returns a String representation of the given mmemonic specified by the KeyEvent constant |
static boolean |
isCorrectAccelerator(java.lang.String modifier,
java.lang.String key)
This method "just" checks if the given combination of modifier and key is a correct accelerator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Accelerators()
Method Detail |
public static javax.swing.KeyStroke getAccelerator(java.lang.String modifier, java.lang.String key)
modifier
- - one of the constants CRTL, ALT, SHIFTkey
- - one of the constants A-Z, 0-9, F-keys or INS, DEL etc.
KeyStroke
public static javax.swing.KeyStroke getAccelerator(java.lang.String accString)
public static java.lang.String getKeyString(int key)
key
- - a KeyEvent constantpublic static int getKeyConstant(java.lang.String key)
key
- - an A-Z, 0-9, alphanumerical characterjavax.swing.KeyEvent
public static boolean isCorrectAccelerator(java.lang.String modifier, java.lang.String key)
modifier
- - the strings CTRL, ALT, SHIFT, NONEkey
- - a String representation of a key (see above)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |