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.


Variable Index

 o CHAR_UNDEFINED
 o KEY_PRESSED
 o KEY_RELEASED
 o KEY_TYPED
 o VK_PAGE_DOWN
 o VK_PAGE_UP
 o VK_UNDEFINED

Constructor Index

 o KeyEvent(Component, int, long, int, int)
Constructs a KeyEvent object with the specified source component, type, modifiers, and key.
 o KeyEvent(Component, int, long, int, int, char)
Constructs a KeyEvent object with the specified source component, type, modifiers, and key.

Method Index

 o getKeyChar()
Returns the character associated with the key in this event.
 o getKeyCode()
Returns the integer key-code associated with the key in this event.

Variables

 o KEY_PRESSED
 public static final int KEY_PRESSED
 o KEY_RELEASED
 public static final int KEY_RELEASED
 o KEY_TYPED
 public static final int KEY_TYPED
 o CHAR_UNDEFINED
 public static final char CHAR_UNDEFINED
 o VK_UNDEFINED
 public static final int VK_UNDEFINED
 o VK_PAGE_UP
 public static final int VK_PAGE_UP
 o VK_PAGE_DOWN
 public static final int VK_PAGE_DOWN

Constructors

 o 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
 o 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

Methods

 o 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.

 o 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