|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.web3d.vrml.util.Xj3DKeyEvent
public class Xj3DKeyEvent
A key event object modeled on the awt and swt key event objects. This class has been developed for use within the X3D KeySensor and StringSensor node implementations to ensure independence from a specific ui toolkit implementation. This class is limited in capability to delivering key characters and identifying the few non-character generating keys that are specifically required by the X3D spec.
| Field Summary | |
|---|---|
static char |
CHAR_UNDEFINED
The constant defining that no character is associated with the key |
static int |
KEY_PRESSED
The constant defining a key pressed event |
static int |
KEY_RELEASED
The constant defining a key released event |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
Xj3DKeyEvent(java.lang.Object src,
int id,
char c,
int code)
Constructor for a character associated event. |
|
| Method Summary | |
|---|---|
int |
getID()
Return the event identifier. |
char |
getKeyChar()
Returns the character associated with the key that generated this event. |
int |
getKeyCode()
Returns the key identifier code associated with the key that generated this event. |
boolean |
isAction()
Returns whether the key that generated this event is a defined action key. |
boolean |
isBackspaceKey()
Returns whether the character associated with the key that generated this event is the Backspace key. |
boolean |
isCharacter()
Returns whether there is a character associated with the key that generated this event. |
boolean |
isEnterKey()
Returns whether the character associated with the key that generated this event is the Enter key. |
boolean |
isModifier()
Returns whether the key that generated this event is a defined modifer key. |
| Methods inherited from class java.util.EventObject |
|---|
getSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int KEY_PRESSED
public static final int KEY_RELEASED
public static final char CHAR_UNDEFINED
| Constructor Detail |
|---|
public Xj3DKeyEvent(java.lang.Object src,
int id,
char c,
int code)
src - the object that was the source of the eventid - the event id, either KEY_PRESSED or KEY_RELEASED.c - the character associated with the key.code - the identifier of the specific defined
function of this character associated key event.| Method Detail |
|---|
public int getID()
public boolean isCharacter()
public boolean isEnterKey()
public boolean isBackspaceKey()
public char getKeyChar()
public int getKeyCode()
public boolean isAction()
public boolean isModifier()
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||