org.jagatoo.input.actions.impl
Class InputHandlerSuspendAction

java.lang.Object
  extended by org.jagatoo.input.actions.AbstractInputAction
      extended by org.jagatoo.input.actions.AbstractInvokableInputAction
          extended by org.jagatoo.input.actions.AbstractLabeledInvokableInputAction
              extended by org.jagatoo.input.actions.impl.InputHandlerSuspendAction
All Implemented Interfaces:
InputAction, InvokableInputAction, LabeledInputAction, LabeledInvokableInputAction

public class InputHandlerSuspendAction
extends AbstractLabeledInvokableInputAction

This InvokableInputAction handles disabling and enabling of an InputHandler on input events.


Field Summary
static java.lang.String SUCCESS
           
 
Constructor Summary
InputHandlerSuspendAction(int ordinal, InputHandler<?> ih)
           
InputHandlerSuspendAction(int ordinal, InputHandler<?> ih, int suspendMask)
           
InputHandlerSuspendAction(int ordinal, java.lang.String text, InputHandler<?> ih)
           
InputHandlerSuspendAction(int ordinal, java.lang.String text, InputHandler<?> ih, int suspendMask)
           
 
Method Summary
 int getSuspendMask()
           
 java.lang.String invokeAction(InputDevice device, DeviceComponent comp, int delta, int state, long nanoTime)
          This method is invoked when the bound InputDevice changed its state.
 
Methods inherited from class org.jagatoo.input.actions.AbstractLabeledInvokableInputAction
getLocalizedText, getText
 
Methods inherited from class org.jagatoo.input.actions.AbstractInputAction
ordinal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jagatoo.input.actions.InputAction
ordinal
 

Field Detail

SUCCESS

public static final java.lang.String SUCCESS
See Also:
Constant Field Values
Constructor Detail

InputHandlerSuspendAction

public InputHandlerSuspendAction(int ordinal,
                                 java.lang.String text,
                                 InputHandler<?> ih,
                                 int suspendMask)

InputHandlerSuspendAction

public InputHandlerSuspendAction(int ordinal,
                                 InputHandler<?> ih,
                                 int suspendMask)

InputHandlerSuspendAction

public InputHandlerSuspendAction(int ordinal,
                                 java.lang.String text,
                                 InputHandler<?> ih)

InputHandlerSuspendAction

public InputHandlerSuspendAction(int ordinal,
                                 InputHandler<?> ih)
Method Detail

getSuspendMask

public final int getSuspendMask()
Returns:
the suspend-maks to apply to the InputHandler when the action is invoked.

invokeAction

public java.lang.String invokeAction(InputDevice device,
                                     DeviceComponent comp,
                                     int delta,
                                     int state,
                                     long nanoTime)
This method is invoked when the bound InputDevice changed its state.

Parameters:
device - the bound device
comp - the bound device component
delta - the delta of the previous and current state
state - the current state
Returns:
a success message (implementation dependent)