All Packages Class Hierarchy This Package Previous Next Index
Class com.bulletproof.gui.event.KeyEvent
java.lang.Object
|
+----com.bulletproof.gui.GUIEvent
|
+----com.bulletproof.gui.event.KeyEvent
- public class KeyEvent
- extends GUIEvent
The component-level keyboard event.
-
CHAR_UNDEFINED
-
-
KEY_PRESSED
-
-
KEY_RELEASED
-
-
KEY_TYPED
-
-
VK_PAGE_DOWN
-
-
VK_PAGE_UP
-
-
VK_UNDEFINED
-
-
KeyEvent(Component, int, long, int, int)
- Constructs a KeyEvent object with the specified source component,
type, modifiers, and key.
-
KeyEvent(Component, int, long, int, int, char)
- Constructs a KeyEvent object with the specified source component,
type, modifiers, and key.
-
getKeyChar()
- Returns the character associated with the key in this event.
-
getKeyCode()
- Returns the integer key-code associated with the key in this event.
KEY_PRESSED
public static final int KEY_PRESSED
KEY_RELEASED
public static final int KEY_RELEASED
KEY_TYPED
public static final int KEY_TYPED
CHAR_UNDEFINED
public static final char CHAR_UNDEFINED
VK_UNDEFINED
public static final int VK_UNDEFINED
VK_PAGE_UP
public static final int VK_PAGE_UP
VK_PAGE_DOWN
public static final int VK_PAGE_DOWN
KeyEvent
public KeyEvent(Component source,
int id,
long when,
int modifiers,
int keyCode)
- Constructs a KeyEvent object with the specified source component,
type, modifiers, and key.
- Parameters:
- source - the object where the event originated
KeyEvent
public KeyEvent(Component source,
int id,
long when,
int modifiers,
int keyCode,
char keyChar)
- Constructs a KeyEvent object with the specified source component,
type, modifiers, and key.
- Parameters:
- source - the object where the event originated
getKeyChar
public char getKeyChar()
- Returns the character associated with the key in this event.
If no valid Unicode character exists for this key event, keyChar
is CHAR_UNDEFINED.
getKeyCode
public int getKeyCode()
- Returns the integer key-code associated with the key in this event.
For KEY_TYPED events, keyCode is VK_UNDEFINED.
All Packages Class Hierarchy This Package Previous Next Index