|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.swing.InputKeys
public class InputKeys
Methods for input key handling.
Constructor Summary | |
---|---|
protected |
InputKeys()
Don't allow instantiation but do allow overrides. |
Method Summary | |
---|---|
static int |
getKeyEvent(java.lang.String keyName)
Return KeyStroke for specified key character. |
static void |
simulateKeyEvent(java.awt.event.KeyEvent keyEvent,
java.awt.Component component)
Simulate a key event for a component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected InputKeys()
Method Detail |
---|
public static int getKeyEvent(java.lang.String keyName)
keyName
- The accelerator key name.
Only parly implemented!
public static void simulateKeyEvent(java.awt.event.KeyEvent keyEvent, java.awt.Component component) throws java.lang.Exception
keyEvent
- The key event.component
- The component to receive the event.
java.lang.Exception
- On any kind of exception.
A component will ignore events unless it appears to be focused. We set the the private field "focusManagerIsDispatching" in AWTEvent to true using reflection to allow the key event to take effect.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |