public final class TextEvent extends Event
Event.Type.TEXT_ENTERED.Event.Type| Modifier and Type | Field and Description |
|---|---|
char |
character
The Java representation of the character that was entered.
|
int |
unicode
The UTF-32 code of the character that was entered.
|
| Constructor and Description |
|---|
TextEvent(int type,
int unicode)
Constructs a new text event.
|
| Modifier and Type | Method and Description |
|---|---|
TextEvent |
asTextEvent()
Attempts to cast this event to a
TextEvent. |
asJoystickButtonEvent, asJoystickEvent, asJoystickMoveEvent, asKeyEvent, asMouseButtonEvent, asMouseEvent, asMouseWheelEvent, asSizeEventpublic final int unicode
public final char character
public TextEvent(int type,
int unicode)
type - the type of the event.
This must be a valid ordinal in the Event.Type enumeration.unicode - the UTF-32 code of the character that was entered.public TextEvent asTextEvent()
EventTextEvent.asTextEvent in class EventTextEvent if its type is
Event.Type.TEXT_ENTERED, null otherwise.