org.jagatoo.input.devices.components
Class ControllerButton

java.lang.Object
  extended by org.jagatoo.input.devices.components.DeviceComponent
      extended by org.jagatoo.input.devices.components.DigitalDeviceComponent
          extended by org.jagatoo.input.devices.components.ControllerButton
Direct Known Subclasses:
JInputControllerButton

public class ControllerButton
extends DigitalDeviceComponent

This is a simple abstraction of a Controller's button.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jagatoo.input.devices.components.DeviceComponent
DeviceComponent.Type
 
Field Summary
 
Fields inherited from class org.jagatoo.input.devices.components.DeviceComponent
nextID
 
Constructor Summary
ControllerButton(Controller controller, int index, java.lang.String name)
           
 
Method Summary
 boolean getBooleanState()
           
 Controller getController()
           
 int getIndex()
           
 InputState getState()
           
 void setState(boolean state)
           
 void setState(InputState state)
           
 java.lang.String toString()
          
 
Methods inherited from class org.jagatoo.input.devices.components.DeviceComponent
bindAction, bindAction, getDeviceComponentID, getLocalizedName, getName, getType, isAnalog, isDigital, notifyBoundActions, unbindAction, unbindAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ControllerButton

public ControllerButton(Controller controller,
                        int index,
                        java.lang.String name)
Method Detail

getController

public final Controller getController()
Returns:
the Controller, this button belongs to.

getIndex

public final int getIndex()
Returns:
the Button's index.

setState

public void setState(InputState state)

setState

public final void setState(boolean state)

getState

public final InputState getState()
Returns:
this button's current state.

getBooleanState

public final boolean getBooleanState()
Returns:
this button's current boolean state.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object