public class CompoundKeyEvent extends InputEvent implements IEventArgs
Modifier and Type | Field and Description |
---|---|
static EventType<CompoundKeyEvent> |
ANY
Any CompoundKeyEvent.
|
static EventType<CompoundKeyEvent> |
NONE
Neither Pressed, nor Typed, nor Released.
|
static EventType<CompoundKeyEvent> |
PRESSED
The key has been pressed.
|
static EventType<CompoundKeyEvent> |
RELEASED
The key has been released.
|
static EventType<CompoundKeyEvent> |
TYPED
The character has been typed.
|
consumed, NULL_SOURCE_TARGET, target
source
EMPTY
Constructor and Description |
---|
CompoundKeyEvent(Object source,
EventType<CompoundKeyEvent> type,
KeyEvent keyEvent)
Constructs a new event.
|
CompoundKeyEvent(Object source,
KeyEvent keyEvent)
Constructs a new event for a key that has been typed.
|
Modifier and Type | Method and Description |
---|---|
KeyCode |
getKeyCode()
Returns the key code.
|
KeyEvent |
getKeyEvent()
Returns the original
KeyEvent . |
EventType<CompoundKeyEvent> |
getKeyEventType()
Gets the type of the event.
|
String |
getKeyValue()
Returns the value of the character that has been typed.
|
ModifierKeys |
getModifiers()
Returns the state of the modifiers at the time of the event.
|
boolean |
isHandled()
Gets a value that indicates whether this event has been handled.
|
void |
setHandled(boolean value)
Sets a value that indicates whether this event has been handled.
|
getEventType
clone, consume, copyFor, fireEvent, getTarget, isConsumed
getSource, toString
public static final EventType<CompoundKeyEvent> ANY
public static final EventType<CompoundKeyEvent> NONE
public static final EventType<CompoundKeyEvent> PRESSED
public static final EventType<CompoundKeyEvent> RELEASED
public static final EventType<CompoundKeyEvent> TYPED
public CompoundKeyEvent(Object source, EventType<CompoundKeyEvent> type, KeyEvent keyEvent)
type
- The type to usekeyEvent
- The KeyEvent to use.public final KeyCode getKeyCode()
public final KeyEvent getKeyEvent()
KeyEvent
.public final EventType<CompoundKeyEvent> getKeyEventType()
public final String getKeyValue()
public final ModifierKeys getModifiers()
public final boolean isHandled()
setHandled(boolean)
public final void setHandled(boolean value)
value
- The Handled to set.isHandled()