|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Event listener interface for keyboard events.
Field Summary | |
static int |
KEY_ALT
|
static int |
KEY_BACKSPACE
|
static int |
KEY_CTRL
|
static int |
KEY_DELETE
|
static int |
KEY_DOWN
|
static int |
KEY_END
|
static int |
KEY_ENTER
|
static int |
KEY_ESCAPE
|
static int |
KEY_HOME
|
static int |
KEY_LEFT
|
static int |
KEY_PAGEDOWN
|
static int |
KEY_PAGEUP
|
static int |
KEY_RIGHT
|
static int |
KEY_SHIFT
|
static int |
KEY_TAB
|
static int |
KEY_UP
|
static int |
MODIFIER_ALT
|
static int |
MODIFIER_CTRL
|
static int |
MODIFIER_SHIFT
|
Method Summary | |
void |
onKeyDown(Widget sender,
char keyCode,
int modifiers)
Fired when the user depresses a physical key. |
void |
onKeyPress(Widget sender,
char keyCode,
int modifiers)
Fired when a keyboard action generates a character. |
void |
onKeyUp(Widget sender,
char keyCode,
int modifiers)
Fired when the user releases a physical key. |
Field Detail |
public static final int KEY_ALT
public static final int KEY_BACKSPACE
public static final int KEY_CTRL
public static final int KEY_DELETE
public static final int KEY_DOWN
public static final int KEY_END
public static final int KEY_ENTER
public static final int KEY_ESCAPE
public static final int KEY_HOME
public static final int KEY_LEFT
public static final int KEY_PAGEDOWN
public static final int KEY_PAGEUP
public static final int KEY_RIGHT
public static final int KEY_SHIFT
public static final int KEY_TAB
public static final int KEY_UP
public static final int MODIFIER_ALT
public static final int MODIFIER_CTRL
public static final int MODIFIER_SHIFT
Method Detail |
public void onKeyDown(Widget sender, char keyCode, int modifiers)
sender
- the widget that was focused when the event occurred.keyCode
- the physical key that was depressed. Constants for this
value are defined in this interface with the KEYCODE prefix.modifiers
- the modifier keys pressed at when the event occurred. This
value is a combination of the bits defined by
MODIFIER_SHIFT
,
MODIFIER_CTRL
, and
MODIFIER_ALT
.public void onKeyPress(Widget sender, char keyCode, int modifiers)
sender
- the widget that was focused when the event occurred.keyCode
- the Unicode character that was generated by the keyboard
action.modifiers
- the modifier keys pressed at when the event occurred. This
value is a combination of the bits defined by
MODIFIER_SHIFT
,
MODIFIER_CTRL
, and
MODIFIER_ALT
.public void onKeyUp(Widget sender, char keyCode, int modifiers)
sender
- the widget that was focused when the event occurred.keyCode
- the physical key that was released. Constants for this value
are defined in this interface with the KEYCODE prefix.modifiers
- the modifier keys pressed at when the event occurred. This
value is a combination of the bits defined by
MODIFIER_SHIFT
,
MODIFIER_CTRL
, and
MODIFIER_ALT
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |