com.jme.input
Class InputHandlerDevice
java.lang.Object
com.jme.input.InputHandlerDevice
- Direct Known Subclasses:
- JoystickInputHandlerDevice, KeyboardInputHandlerDevice, MouseInputHandlerDevice, UtilInputHandlerDevice
public abstract class InputHandlerDevice
- extends java.lang.Object
Devices are used in InputHandler
to create different types of ActionTrigger
s. The method
createTriggers(com.jme.input.action.InputActionInterface, int, int, boolean, com.jme.input.InputHandler)
(...) is called by InputHandler when actions are registered via
InputHandler.addAction(com.jme.input.action.InputActionInterface,String,int,int,boolean)
.
- See Also:
MouseInputHandlerDevice
,
KeyboardInputHandlerDevice
,
JoystickInputHandlerDevice
Method Summary |
protected abstract 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). |
java.lang.String |
getName()
Query name of this device. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
InputHandlerDevice
protected InputHandlerDevice(java.lang.String name)
- Parameters:
name
- name of the device
getName
public final java.lang.String getName()
- Query name of this device. Note: The name may not change, because it is used as key, that's why this method
is final (avoid overrriding and returning another name).
- Returns:
- name of this device
createTriggers
protected abstract 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).
- Parameters:
action
- action that will be invoked upon trigger activationaxis
- axis this trigger is responsible forbutton
- button this trigger is responsible forallowRepeats
- true to allow repeatsinputHandler
- input handler for the triggers
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object