com.jme.input.joystick
Class TriggersJoystickInputListener

java.lang.Object
  extended by com.jme.input.joystick.TriggersJoystickInputListener
All Implemented Interfaces:
JoystickInputListener

 class TriggersJoystickInputListener
extends java.lang.Object
implements JoystickInputListener

Each JoystickInputHandlerDevice has an instance of this class which is subscribed at the JoystickInput to receive joystick events and forward them to the joystick triggers.


Constructor Summary
TriggersJoystickInputListener()
           
 
Method Summary
 void activate()
           
(package private)  void add(JoystickInputHandlerDevice.JoystickAxisTrigger trigger)
           
(package private)  void add(JoystickInputHandlerDevice.JoystickButtonTrigger trigger)
           
 void deactivate()
           
 void onAxis(Joystick controller, int axis, float axisValue)
          Invoked when an axis has changed it's value.
 void onButton(Joystick controller, int button, boolean pressed)
          Invoked when a button was pressed or released.
(package private)  void remove(JoystickInputHandlerDevice.JoystickAxisTrigger trigger)
           
(package private)  void remove(JoystickInputHandlerDevice.JoystickButtonTrigger trigger)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriggersJoystickInputListener

public TriggersJoystickInputListener()
Method Detail

activate

public void activate()

deactivate

public void deactivate()

onAxis

public void onAxis(Joystick controller,
                   int axis,
                   float axisValue)
Description copied from interface: JoystickInputListener
Invoked when an axis has changed it's value.

Specified by:
onAxis in interface JoystickInputListener
Parameters:
controller - joystick the axis belongs to
axis - index of the axis
axisValue - new value of the axis

onButton

public void onButton(Joystick controller,
                     int button,
                     boolean pressed)
Description copied from interface: JoystickInputListener
Invoked when a button was pressed or released.

Specified by:
onButton in interface JoystickInputListener
Parameters:
controller - joystick the button belongs to
button - index of the button
pressed - true if button was pressed, false if released

add

void add(JoystickInputHandlerDevice.JoystickButtonTrigger trigger)

remove

void remove(JoystickInputHandlerDevice.JoystickButtonTrigger trigger)

add

void add(JoystickInputHandlerDevice.JoystickAxisTrigger trigger)

remove

void remove(JoystickInputHandlerDevice.JoystickAxisTrigger trigger)