|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.action.keys.KeyMgr
public final class KeyMgr
The key manager is the central instance for handling keysequences. It transforms those sequences into key sequence events that are passed through the plugin hierarchy. In order to prevent unnecessesary events, it transforms only those sequences that have previously been registered with the manager. In order to make a toplevel component key aware, use the install method.
| Nested Class Summary | |
|---|---|
class |
KeyMgr.KeyAction
Updates the actualKey sequence of the manager, throws the event and restores the manager if no more combinations are possible. |
class |
KeyMgr.MultiActionMap
Action Map that creates new Actions for pressed keys "on the fly". |
class |
KeyMgr.MultiInputMap
Input Map that supports two different parent map. |
| Field Summary | |
|---|---|
static java.lang.String |
ESCAPE
Escape key for input/action maps |
| Method Summary | |
|---|---|
void |
addSequence(KeySequence sequence)
Adds the given sequence to the list of recognized sequences. |
void |
addSequences(java.util.Iterator sequences)
Adds the given sequences to the list of recognized sequences. |
static KeyMgr |
getInstance()
Returns the singleton instance of the key manager, creating it if necessary. |
void |
install(javax.swing.JComponent c)
Installs the manager for the given JComponent. |
static java.lang.String |
keyCodeToString(int keyCode)
Converts the given key code to a string, as defined in the java\.awt\.event\.KeyEvent class. |
void |
removeSequence(KeySequence sequence)
Removes the given sequences to the list of recognized sequences. |
void |
removeSequences(java.util.Iterator sequences)
Removes the given sequencess to the list of recognized sequences. |
void |
resumeUpdate()
Resumes updates of the clients of this key manager. |
static int |
stringToKeyCode(java.lang.String keyName)
Converts the given string to a keycode, as defined in the java\.awt\.event\.KeyEvent class. |
void |
suspendUpdate()
Suspends updates of the clients of this key manager. |
void |
uninstall(javax.swing.JComponent c)
Uninstalls the manager from the given JComponent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ESCAPE
| Method Detail |
|---|
public static int stringToKeyCode(java.lang.String keyName)
keyName - Key name to translate
public static java.lang.String keyCodeToString(int keyCode)
keyCode - Key code to translate
public static KeyMgr getInstance()
public void install(javax.swing.JComponent c)
c - Component to install the manager topublic void uninstall(javax.swing.JComponent c)
c - Component to uninstall the manager frompublic void suspendUpdate()
public void resumeUpdate()
suspendUpdate() method has been called before.
public void addSequences(java.util.Iterator sequences)
sequences - Iterator of KeySequence objects to addpublic void removeSequences(java.util.Iterator sequences)
sequences - Iterator of KeySequence objects to removepublic void addSequence(KeySequence sequence)
sequence - Sequence to addpublic void removeSequence(KeySequence sequence)
sequence - Sequence to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||