Package heronarts.glx.event
Class Event
java.lang.Object
heronarts.glx.event.Event
- Direct Known Subclasses:
KeyEvent
,MouseEvent
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
final double
Value of glfwGetTime() in seconds when the event occurredstatic final int
final int
Bitmask of modifier keys heldfinal long
Java System.nanoTime() when the event occurredstatic final Event
static final int
static final int
static final Event
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconsume()
Consume the event.int
double
getTime()
Gets the time of the event in seconds, as returned by the GLFW timerboolean
hasModifier
(int modifier) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
-
Field Details
-
NONE
-
SIBLING_REMOVED
-
SHIFT
public static final int SHIFT- See Also:
-
CONTROL
public static final int CONTROL- See Also:
-
ALT
public static final int ALT- See Also:
-
META
public static final int META- See Also:
-
CAPS_LOCK
public static final int CAPS_LOCK- See Also:
-
NUM_LOCK
public static final int NUM_LOCK- See Also:
-
glfwTime
public final double glfwTimeValue of glfwGetTime() in seconds when the event occurred -
nanoTime
public final long nanoTimeJava System.nanoTime() when the event occurred -
modifiers
public final int modifiersBitmask of modifier keys held
-
-
Constructor Details
-
Event
protected Event(int modifiers) -
Event
protected Event(int modifiers, double glfwTime, long nanoTime)
-
-
Method Details
-
getTime
public double getTime()Gets the time of the event in seconds, as returned by the GLFW timer- Returns:
- Time in seconds, returned by GLFW
-
getModifiers
public int getModifiers() -
hasModifier
public boolean hasModifier(int modifier) -
isShiftDown
public boolean isShiftDown() -
isControlDown
public boolean isControlDown() -
isAltDown
public boolean isAltDown() -
isMetaDown
public boolean isMetaDown() -
isCommand
public boolean isCommand() -
isMultiSelect
public boolean isMultiSelect() -
isRangeSelect
public boolean isRangeSelect() -
consume
Consume the event. Lower-priority event handlers should not perform the action associated with this event.- Returns:
- this
-
isConsumed
public boolean isConsumed()
-