com.jme.input.mouse
Class MouseInputHandlerDevice.MouseButtonTrigger
java.lang.Object
com.jme.input.ActionTrigger
com.jme.input.mouse.MouseInputHandlerDevice.MouseButtonTrigger
- Enclosing class:
- MouseInputHandlerDevice
protected class MouseInputHandlerDevice.MouseButtonTrigger
- extends ActionTrigger
Method Summary |
void |
checkActivation(char character,
int buttonIndex,
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MouseInputHandlerDevice.MouseButtonTrigger
public MouseInputHandlerDevice.MouseButtonTrigger(InputHandler handler,
java.lang.String triggerName,
InputActionInterface action,
int button,
boolean allowRepeats)
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 informationinvocationIndex
- 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 buttonIndex,
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 characterbuttonIndex
- index of the device part that caused the event, default -1, >= 0 if valid
example: mouse button index, joystick axis indexposition
- new position of the device part that caused the event, default NaN, common range [-1;1]
example: joystick axis positiondelta
- position delta of the device part that caused the event, default NaN, common range [-1;1]
example: joystick axis deltapressed
- indicates if a button was pressed or released, default: false
example: true if joystick button is pressed, false if joystick button is releaseddata
- any trigger specific data
example: joystick triggers get the Joystick instance for fast comparison- See Also:
ActionTrigger.activate()
,
ActionTrigger.deactivate()