Interface InputHandlerFragment

All Superinterfaces:
Fragment, RawInputListener

public interface InputHandlerFragment extends Fragment, RawInputListener
A fragment that intercept raw input events. It extends RawInputListener and is automatically registered with the InputManager when the component is initialized. If higher-level input handling is needed, the The onXXEvents are called only if the component is enabled. receiveInputManager(InputManager) method can be overridden to receive the InputManager instance and register additional input listeners.
  • Method Details

    • beginInput

      default void beginInput()
      Description copied from interface: RawInputListener
      Called before a batch of input will be sent to this RawInputListener.
      Specified by:
      beginInput in interface RawInputListener
    • endInput

      default void endInput()
      Description copied from interface: RawInputListener
      Called after a batch of input was sent to this RawInputListener. The listener should set the consumed flag on any events that have been consumed either at this call or previous calls.
      Specified by:
      endInput in interface RawInputListener
    • receiveInputManager

      default void receiveInputManager(InputManager inputManager)
      Receives the InputManager instance when the component is initialized. This method can be overridden to register additional input listeners. The reference to the InputManager can be stored and used later in the component logic.
    • onJoyAxisEvent

      default void onJoyAxisEvent(JoyAxisEvent evt)
      Description copied from interface: RawInputListener
      Invoked on joystick axis events.
      Specified by:
      onJoyAxisEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onJoyButtonEvent

      default void onJoyButtonEvent(JoyButtonEvent evt)
      Description copied from interface: RawInputListener
      Invoked on joystick button presses.
      Specified by:
      onJoyButtonEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onMouseMotionEvent

      default void onMouseMotionEvent(MouseMotionEvent evt)
      Description copied from interface: RawInputListener
      Invoked on mouse movement/motion events.
      Specified by:
      onMouseMotionEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onMouseButtonEvent

      default void onMouseButtonEvent(MouseButtonEvent evt)
      Description copied from interface: RawInputListener
      Invoked on mouse button events.
      Specified by:
      onMouseButtonEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onKeyEvent

      default void onKeyEvent(KeyInputEvent evt)
      Description copied from interface: RawInputListener
      Invoked on keyboard key press or release events.
      Specified by:
      onKeyEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onTouchEvent

      default void onTouchEvent(TouchEvent evt)
      Description copied from interface: RawInputListener
      Invoked on touchscreen touch events.
      Specified by:
      onTouchEvent in interface RawInputListener
      Parameters:
      evt - information about the event