org.jagatoo.input.managers
Class InputStatesManipulator

java.lang.Object
  extended by org.jagatoo.input.managers.InputStatesManipulator

public class InputStatesManipulator
extends java.lang.Object

The InputStatesManipulator provides a simple interface for key states manipulations.


Constructor Summary
protected InputStatesManipulator(InputStatesManager keyStatesManager)
           
 
Method Summary
protected  void apply(short[] currStates)
          Applies the new key states to the InputStatesManager.
 java.lang.Short getState(InputAction action)
           
 void setState(InputAction action, java.lang.Short state)
          Sets the state for the given action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStatesManipulator

protected InputStatesManipulator(InputStatesManager keyStatesManager)
Method Detail

setState

public final void setState(InputAction action,
                           java.lang.Short state)
Sets the state for the given action.

Parameters:
action -
state - the state. Use null to not override the real input-state.

getState

public final java.lang.Short getState(InputAction action)
Parameters:
action -
Returns:
the current state for the given action. (null, if the state is not manipulated).

apply

protected void apply(short[] currStates)
Applies the new key states to the InputStatesManager.