org.jagatoo.input.events
Class ControllerButtonEvent

java.lang.Object
  extended by org.jagatoo.input.events.InputEvent
      extended by org.jagatoo.input.events.ControllerEvent
          extended by org.jagatoo.input.events.ControllerButtonEvent
Direct Known Subclasses:
ControllerButtonPressedEvent, ControllerButtonReleasedEvent

public abstract class ControllerButtonEvent
extends ControllerEvent

Stores the details associated with a controller event.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jagatoo.input.events.ControllerEvent
ControllerEvent.SubType
 
Nested classes/interfaces inherited from class org.jagatoo.input.events.InputEvent
InputEvent.Type
 
Field Summary
protected  ControllerButton button
           
 
Constructor Summary
ControllerButtonEvent(Controller controller, ControllerEvent.SubType subType, ControllerButton button, long when, long lastWhen)
          Create a new event.
ControllerButtonEvent(ControllerEvent.SubType subType)
          Creates a ControllerButtonEvent with default values.
 
Method Summary
 ControllerButton getButton()
           
 boolean getButtonBooleanState()
           
 InputState getButtonState()
           
 void set(ControllerButtonEvent e)
          Sets the fields of this ControllerPressedEvent to match the given event.
 void set(Controller controller, ControllerEvent.SubType subType, ControllerButton button, long when, long lastWhen)
           
 java.lang.String toString()
          
 
Methods inherited from class org.jagatoo.input.events.ControllerEvent
getController, getSubType, set, set
 
Methods inherited from class org.jagatoo.input.events.InputEvent
getComponent, getLastWhen, getType, getWhen, set, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

button

protected ControllerButton button
Constructor Detail

ControllerButtonEvent

public ControllerButtonEvent(ControllerEvent.SubType subType)
Creates a ControllerButtonEvent with default values.

Parameters:
type -

ControllerButtonEvent

public ControllerButtonEvent(Controller controller,
                             ControllerEvent.SubType subType,
                             ControllerButton button,
                             long when,
                             long lastWhen)
Create a new event.

Parameters:
controller -
subType -
button -
when -
lastWhen -
Method Detail

getButton

public final ControllerButton getButton()

getButtonState

public final InputState getButtonState()

getButtonBooleanState

public final boolean getButtonBooleanState()

toString

public java.lang.String toString()

Specified by:
toString in class ControllerEvent
Returns:
in formation about this InputEvent as a String.

set

public void set(Controller controller,
                ControllerEvent.SubType subType,
                ControllerButton button,
                long when,
                long lastWhen)
Parameters:
controller -
subType -
button -
when -
lastWhen -

set

public void set(ControllerButtonEvent e)
Sets the fields of this ControllerPressedEvent to match the given event.