|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.rad.ui.event.Key
public final class Key
Stores Key Event Data for Accelerator.
KeyEvent| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object pObject)
Returns true if this object is identical to the specified object. |
boolean |
equals(UIKeyEvent pEvent)
Returns true if the Key matches the given KeyEvent. |
static Key |
getKey(char pKeyChar)
Returns a shared instance of an Key
that represents a KEY_TYPED event for the
specified character. |
static Key |
getKey(char pKeyChar,
int pModifiers)
Returns a shared instance of an Key,
for the specified character. |
static Key |
getKey(UIKeyEvent pEvent)
Returns a shared instance of an Key
that represents the Key of the given UIKeyEvent. |
char |
getKeyChar()
Returns the character for this Key. |
int |
getKeyCode()
Returns the numeric key code for this Key. |
int |
getKeyEventType()
Returns the type of KeyEvent which corresponds to
this Key. |
static Key |
getKeyOnPressed(int pKeyCode)
Returns a shared instance of an Key
that represents a KEY_PRESSED event for the
specified key code. |
static Key |
getKeyOnPressed(int pKeyCode,
int pModifiers)
Returns a shared instance of an Key,
for the specified key code. |
static Key |
getKeyOnReleased(int pKeyCode)
Returns a shared instance of an Key
that represents a KEY_RELEASED event for the
specified key code. |
static Key |
getKeyOnReleased(int pKeyCode,
int pModifiers)
Returns a shared instance of an Key,
for the specified key code. |
int |
getModifiers()
Returns the modifier keys for this Key. |
int |
hashCode()
Returns a numeric value for this object that is likely to be unique, making it a good choice as the index value in a hash table. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public final boolean equals(java.lang.Object pObject)
equals in class java.lang.ObjectpObject - the Object to compare this object to
public int hashCode()
hashCode in class java.lang.Objectpublic final char getKeyChar()
Key.
public final int getKeyCode()
Key.
public final int getModifiers()
Key.
public final int getKeyEventType()
KeyEvent which corresponds to
this Key.
KeyEvent.KEY_PRESSED,
KeyEvent.KEY_TYPED,
or KeyEvent.KEY_RELEASEDpublic static Key getKey(UIKeyEvent pEvent)
Key
that represents the Key of the given UIKeyEvent.
pEvent - the UIKeyEvent for this key
Key object for the given UIKeyEventpublic static Key getKey(char pKeyChar)
Key
that represents a KEY_TYPED event for the
specified character.
pKeyChar - the character value for a keyboard key
Key object for that key
public static Key getKey(char pKeyChar,
int pModifiers)
Key,
for the specified character.
The modifiers
pKeyChar - the Character for a keyboard characterpModifiers - a bitwise-ored combination of any modifiers
Key object for that keypublic static Key getKeyOnPressed(int pKeyCode)
Key
that represents a KEY_PRESSED event for the
specified key code.
pKeyCode - the key code value for a keyboard key
Key object for that key
public static Key getKeyOnPressed(int pKeyCode,
int pModifiers)
Key,
for the specified key code. Note
that the first parameter is of type Character rather than
char. This is to avoid inadvertent clashes with
calls to getKey(int keyCode, int modifiers).
The modifiers
pKeyCode - the key code for a keyboard characterpModifiers - a bitwise-ored combination of any modifiers
Key object for that keypublic static Key getKeyOnReleased(int pKeyCode)
Key
that represents a KEY_RELEASED event for the
specified key code.
pKeyCode - the key code value for a keyboard key
Key object for that key
public static Key getKeyOnReleased(int pKeyCode,
int pModifiers)
Key,
for the specified key code. Note
that the first parameter is of type Character rather than
char. This is to avoid inadvertent clashes with
calls to getKey(int keyCode, int modifiers).
The modifiers
pKeyCode - the key code for a keyboard characterpModifiers - a bitwise-ored combination of any modifiers
Key object for that keypublic boolean equals(UIKeyEvent pEvent)
pEvent - the KeyEvent
java.lang.NullPointerException - if anEvent is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||