com.jme.input.action
Class KeyToggleBoolean

java.lang.Object
  extended by com.jme.input.action.InputAction
      extended by com.jme.input.action.KeyInputAction
          extended by com.jme.input.action.KeyToggleBoolean
All Implemented Interfaces:
InputActionInterface

public class KeyToggleBoolean
extends KeyInputAction

KeyToggleBoolean switches a boolean value from true to false based on a trigger. Created on Jul 21, 2004

Version:
$Id: KeyToggleBoolean.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Joel Schuster

Field Summary
 
Fields inherited from class com.jme.input.action.InputAction
speed
 
Constructor Summary
KeyToggleBoolean(boolean value)
          Instantiates a new KeyToggleBoolean object.
 
Method Summary
 boolean isValue()
          returns the value.
 void performAction(InputActionEvent evt)
          switches the value from true to false, or false to true.
 void setValue(boolean value)
          sets the value.
 
Methods inherited from class com.jme.input.action.InputAction
getSpeed, setSpeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyToggleBoolean

public KeyToggleBoolean(boolean value)
Instantiates a new KeyToggleBoolean object. The initial value is supplied.

Parameters:
value - the initial value to use for the toggle.
Method Detail

performAction

public void performAction(InputActionEvent evt)
switches the value from true to false, or false to true.

Parameters:
evt - the event that called this action.

isValue

public boolean isValue()
returns the value.

Returns:
Returns the value.

setValue

public void setValue(boolean value)
sets the value.

Parameters:
value - The value to set.