|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.ui.Event
ewe.ui.KeyEvent
KeyEvent is a key press event.
| Field Summary | |
int |
key
The key pressed or entered by other means (grafitti input). |
static int |
KEY_PRESS
The event type for a key press event. |
static int |
KEY_RELEASE
|
int |
modifiers
The state of the modifier keys when the event occured. |
String |
text
This is used if a key or key-combination as pressed by the user has resulted in the generation of a multiple character string. |
int |
textReplacement
This is used with the MULTICHARACTER modifier. |
| Fields inherited from class ewe.ui.Event |
consumed, events, flags, target, timeStamp, type, window |
| Constructor Summary | |
KeyEvent()
|
|
| Method Summary | |
void |
controlToLetter()
Convert specific control keys to their letter counterpart. |
static int |
getActionKey(boolean forHotKey)
|
static int |
getBackKey(boolean forHotKey)
|
static int |
getCancelKey(boolean forHotKey)
|
static boolean |
hasModifier(int key)
Checks to see if a hot-key encoded key has a modifier. |
boolean |
isActionKey()
|
boolean |
isBackKey()
|
boolean |
isCancelKey()
|
boolean |
isHotKey(int controlHotKey)
Checks to see if the key represented by this KeyEvent should be considered to match the hot-key of a particular Control. |
static boolean |
isHotKey(int key,
int controlHotKey)
Checks to see if the pressed hot-key should be considered to match the hot-key of a particular Control. |
boolean |
isMoveToNextControlKey(boolean moveForwards)
|
void |
keypadToKey()
Convert a KEYPAD_ type key into a standard key. |
int |
toKey()
Convert this KeyEvent into a hot-key encoded key code. |
static int |
toKey(int modifier,
char character)
The produces a key code that can be used as a "Hot Key" for a Control. |
static int |
toKey(int modifier,
int key)
The produces a key code that can be used as a "Hot Key" for a Control. |
static String |
toString(int key)
Print a String representation of a key. |
| Methods inherited from class ewe.ui.Event |
toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode |
| Field Detail |
public static final int KEY_PRESS
public static final int KEY_RELEASE
public int key
IKeyspublic String text
public int textReplacement
public int modifiers
IKeys| Constructor Detail |
public KeyEvent()
| Method Detail |
public void controlToLetter()
public void keypadToKey()
public static final String toString(int key)
key - A key as provided in a KeyEvent.
public static final int toKey(int modifier,
char character)
modifier - Any of the IKeys.SHIFT, IKeys.CONTROL, IKeys.ONLY ORed together.If none of these modifiers are used then when the character is pressed with ANY of SHIFT or CONTROL keys, the hot key will be activated. If IKeys.ONLY is specified then the character must be pressed ALONE for the hot key to be activated.
character - The character for the key.
public static final int toKey(int modifier,
int key)
modifier - Any of the IKeys.SHIFT, IKeys.CONTROL, IKeys.ONLY ORed together.If none of these modifiers are used then when the character is pressed with ANY of SHIFT or CONTROL keys, the hot key will be activated. If IKeys.ONLY is specified then the character must be pressed ALONE for the hot key to be activated.
key - The key code for the key. You can use one of the IKeys key codes such as F1, HOME, etc.
public static final boolean hasModifier(int key)
key - The hot-key encoded key code.
public static final boolean isHotKey(int key,
int controlHotKey)
key - The pressed key.controlHotKey - The assigned hot-key of a Control
public final boolean isHotKey(int controlHotKey)
controlHotKey - The assigned hot-key of a Control
public final int toKey()
public boolean isBackKey()
public boolean isActionKey()
public boolean isMoveToNextControlKey(boolean moveForwards)
public boolean isCancelKey()
public static int getBackKey(boolean forHotKey)
public static int getCancelKey(boolean forHotKey)
public static int getActionKey(boolean forHotKey)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||