com.jme.input.joystick
Class JoystickInputHandlerDevice

java.lang.Object
  extended by com.jme.input.InputHandlerDevice
      extended by com.jme.input.joystick.JoystickInputHandlerDevice

public class JoystickInputHandlerDevice
extends InputHandlerDevice

Creates InputHandler triggers for joystick support.


Nested Class Summary
protected  class JoystickInputHandlerDevice.JoystickAxisTrigger
           
protected  class JoystickInputHandlerDevice.JoystickButtonTrigger
           
 
Field Summary
protected  Joystick joystick
           
 
Constructor Summary
JoystickInputHandlerDevice(Joystick joystick, java.lang.String name)
           
 
Method Summary
protected  void createTriggers(InputActionInterface action, int axis, int button, boolean allowRepeats, InputHandler inputHandler)
          Creates device specific trigger(s) for specified axes and buttons (the triggers register themselves at the inputHandler).
 TriggersJoystickInputListener getJoystickListener()
           
 
Methods inherited from class com.jme.input.InputHandlerDevice
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

joystick

protected final Joystick joystick
Constructor Detail

JoystickInputHandlerDevice

public JoystickInputHandlerDevice(Joystick joystick,
                                  java.lang.String name)
Method Detail

getJoystickListener

public TriggersJoystickInputListener getJoystickListener()

createTriggers

protected void createTriggers(InputActionInterface action,
                              int axis,
                              int button,
                              boolean allowRepeats,
                              InputHandler inputHandler)
Description copied from class: InputHandlerDevice
Creates device specific trigger(s) for specified axes and buttons (the triggers register themselves at the inputHandler).

Specified by:
createTriggers in class InputHandlerDevice
Parameters:
action - action that will be invoked upon trigger activation
axis - axis this trigger is responsible for
button - button this trigger is responsible for
allowRepeats - true to allow repeats
inputHandler - input handler for the triggers