|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.system.EventInjector.Event
|
+--net.rim.device.api.system.EventInjector.KeyEvent
The event class that defines a character input event.
Historically, this event class defined a KeyPad event. In reality, KeyEvent represents the input of a character and not the actual event of a key being pressed. You should use this event class if you wish to input text into a TextField or other such areas where characters themselves are required as input.
To inject physical key events, use EventInjector.KeyCodeEvent.
EventInjector,
EventInjector.Event,
EventInjector.TrackwheelEvent,
EventInjector.KeyCodeEvent| Field Summary | ||
|
static int |
KEY_DOWN
Represents a constant indicating that the key is in the down position. |
|
static int |
KEY_REPEAT
Represents a constant indicating that the key is in the down position, repeating the character. |
|
static int |
KEY_UP
Represents a constant indicating that the key is in the up position. |
| Constructor Summary | ||
|
EventInjector.KeyEvent(int event,
char c,
int status,
int time)
Constructs a new KeyEvent instance. |
|
| Method Summary | ||
|
char |
getChar()
Returns the character of the event. |
|
int |
getTime()
Returns the time of the event. |
|
void |
setChar(char c)
Sets the character of the event. |
|
void |
setTime(int time)
Sets the time of the event. |
| Methods inherited from class net.rim.device.api.system.EventInjector.Event |
getEvent, getStatus, post, setEvent, setStatus |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int KEY_DOWN
public static final int KEY_REPEAT
public static final int KEY_UP
| Constructor Detail |
public EventInjector.KeyEvent(int event,
char c,
int status,
int time)
event - One of KEY_DOWN, KEY_REPEAT or KEY_UP.c - The character to invoke. Special characters are defined by Characters.status - Any status flags (as defined by KeypadListener).time - The time the key is held, in milliseconds.Characters| Method Detail |
public char getChar()
public int getTime()
public void setChar(char c)
c - The character to set.public void setTime(int time)
time - An integer representing the time of the event.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.