Class InputEvent

java.lang.Object
com.jme3.input.event.InputEvent
Direct Known Subclasses:
JoyAxisEvent, JoyButtonEvent, KeyInputEvent, MouseButtonEvent, MouseMotionEvent, TouchEvent

public abstract class InputEvent extends Object
An abstract input event.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 to Input.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.