Package com.jme3.input.event
Class InputEvent
java.lang.Object
com.jme3.input.event.InputEvent
- Direct Known Subclasses:
JoyAxisEvent
,JoyButtonEvent
,KeyInputEvent
,MouseButtonEvent
,MouseMotionEvent
,TouchEvent
An abstract input event.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getTime()
The time when the event occurred.boolean
Returns true if the input event has been consumed, meaning it is no longer valid and should not be forwarded to input listeners.void
Call to mark this input event as consumed, meaning it is no longer valid and should not be forwarded to input listeners.void
setTime
(long time) Set the time when the event occurred.
-
Field Details
-
time
protected long time -
consumed
protected boolean consumed
-
-
Constructor Details
-
InputEvent
public InputEvent()
-
-
Method Details
-
getTime
public long getTime()The time when the event occurred. This is relative toInput.getInputTimeNanos()
.- Returns:
- time when the event occurred
-
setTime
public void setTime(long time) Set the time when the event occurred.- Parameters:
time
- time when the event occurred.
-
isConsumed
public boolean isConsumed()Returns true if the input event has been consumed, meaning it is no longer valid and should not be forwarded to input listeners.- Returns:
- true if the input event has been consumed
-
setConsumed
public void setConsumed()Call to mark this input event as consumed, meaning it is no longer valid and should not be forwarded to input listeners.
-