com.jme.input.mouse
Class MouseInputHandlerDevice.MouseAxisTrigger

java.lang.Object
  extended by com.jme.input.ActionTrigger
      extended by com.jme.input.mouse.MouseInputHandlerDevice.MouseAxisTrigger
Enclosing class:
MouseInputHandlerDevice

protected class MouseInputHandlerDevice.MouseAxisTrigger
extends ActionTrigger


Field Summary
 
Fields inherited from class com.jme.input.ActionTrigger
action, allowRepeats, inputHandler, name
 
Constructor Summary
MouseInputHandlerDevice.MouseAxisTrigger(InputHandler handler, java.lang.String triggerName, InputActionInterface action, int axis, boolean allowRepeats)
           
 
Method Summary
 void checkActivation(char character, int axisIndex, float position, float delta, boolean pressed, java.lang.Object data)
          Invoked to activate or deactivate a trigger on specific event.
protected  java.lang.String getDeviceName()
           
protected  void putTriggerInfo(InputActionEvent event, int invocationIndex)
          Called by InputHandler to fill info about the trigger into an event.
protected  void remove()
          Remove this trigger.
 
Methods inherited from class com.jme.input.ActionTrigger
activate, deactivate, getActionInvocationCount, isActive, performAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseInputHandlerDevice.MouseAxisTrigger

public MouseInputHandlerDevice.MouseAxisTrigger(InputHandler handler,
                                                java.lang.String triggerName,
                                                InputActionInterface action,
                                                int axis,
                                                boolean allowRepeats)
Method Detail

remove

protected void remove()
Description copied from class: ActionTrigger
Remove this trigger.

Overrides:
remove in class ActionTrigger

putTriggerInfo

protected void putTriggerInfo(InputActionEvent event,
                              int invocationIndex)
Description copied from class: ActionTrigger
Called by InputHandler to fill info about the trigger into an event. Commonly overwritten by trigger implementations to provide additional info.

Overrides:
putTriggerInfo in class ActionTrigger
Parameters:
event - where to put the information
invocationIndex - index to distinct multiple action invocations per trigger activation
See Also:
ActionTrigger.getActionInvocationCount()

getDeviceName

protected java.lang.String getDeviceName()
Specified by:
getDeviceName in class ActionTrigger
Returns:
name of the device this trigger belongs to

checkActivation

public void checkActivation(char character,
                            int axisIndex,
                            float position,
                            float delta,
                            boolean pressed,
                            java.lang.Object data)
Description copied from class: ActionTrigger
Invoked to activate or deactivate a trigger on specific event. The data in the parameters depend on the kind of trigger. Defaults for each parameter (set if value for parameter is unknown or not applicable) are given below. The trigger should activate or deactivate itself if appropriate.

Specified by:
checkActivation in class ActionTrigger
Parameters:
character - some character data associated with the event, default '\0'.
example: keyboard character
axisIndex - index of the device part that caused the event, default -1, >= 0 if valid
example: mouse button index, joystick axis index
position - new position of the device part that caused the event, default NaN, common range [-1;1]
example: joystick axis position
delta - position delta of the device part that caused the event, default NaN, common range [-1;1]
example: joystick axis delta
pressed - indicates if a button was pressed or released, default: false
example: true if joystick button is pressed, false if joystick button is released
data - any trigger specific data
example: joystick triggers get the Joystick instance for fast comparison
See Also:
ActionTrigger.activate(), ActionTrigger.deactivate()