|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
com.threerings.opengl.gui.event.Event
com.threerings.opengl.gui.event.InputEvent
com.threerings.opengl.gui.event.KeyEvent
public class KeyEvent
Encapsulates the information associated with a keyboard event.
| Field Summary | |
|---|---|
static int |
KEY_PRESSED
Indicates that an event represents a key pressing. |
static int |
KEY_RELEASED
Indicates that an event represents a key release. |
| Fields inherited from class com.threerings.opengl.gui.event.InputEvent |
|---|
ALT_DOWN_MASK, BUTTON1_DOWN_MASK, BUTTON2_DOWN_MASK, BUTTON3_DOWN_MASK, CTRL_DOWN_MASK, META_DOWN_MASK, SHIFT_DOWN_MASK |
| Constructor Summary | |
|---|---|
KeyEvent(Object source,
long when,
int modifiers,
int type,
char keyChar,
int keyCode,
boolean repeat)
|
|
| Method Summary | |
|---|---|
void |
dispatch(ComponentListener listener)
Instructs this event to notify the supplied listener if they implement an interface appropriate to this event. |
char |
getKeyChar()
Returns the character associated with the key. |
int |
getKeyCode()
Returns the numeric identifier associated with the key. |
int |
getType()
Indicates whether this was a KEY_PRESSED or KEY_RELEASED event. |
boolean |
isRepeat()
Checks whether this is a repeat (press) event. |
| Methods inherited from class com.threerings.opengl.gui.event.InputEvent |
|---|
getModifiers, isAltDown, isControlDown, isMetaDown, isShiftDown |
| Methods inherited from class com.threerings.opengl.gui.event.Event |
|---|
consume, getWhen, isConsumed, propagateUpHierarchy, toString |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int KEY_PRESSED
public static final int KEY_RELEASED
| Constructor Detail |
|---|
public KeyEvent(Object source,
long when,
int modifiers,
int type,
char keyChar,
int keyCode,
boolean repeat)
| Method Detail |
|---|
public int getType()
KEY_PRESSED or KEY_RELEASED event.
public char getKeyChar()
KEY_PRESSED events, however getKeyCode() works in all cases.
public int getKeyCode()
Keyboardpublic boolean isRepeat()
public void dispatch(ComponentListener listener)
Event
dispatch in class Event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||