org.jagatoo.input.events
Class ControllerEvent

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

public abstract class ControllerEvent
extends InputEvent

Abstract base class for all Controller events.


Nested Class Summary
static class ControllerEvent.SubType
           
 
Nested classes/interfaces inherited from class org.jagatoo.input.events.InputEvent
InputEvent.Type
 
Constructor Summary
protected ControllerEvent(Controller controller, ControllerEvent.SubType subType, DeviceComponent component, long when, long lastWhen)
          Create a new event.
protected ControllerEvent(ControllerEvent.SubType subType)
          Creates a ControllerEvent with default values.
 
Method Summary
 Controller getController()
          The Controller device, that caused the event.
 ControllerEvent.SubType getSubType()
           
protected  void set(Controller controller, ControllerEvent.SubType subType, DeviceComponent component, long when, long lastWhen)
          Sets the fields of this ControllerEvent.
protected  void set(ControllerEvent e)
          Sets the fields of this ControllerEvent to match the given ControllerEvent.
abstract  java.lang.String toString()
          
 
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
 

Constructor Detail

ControllerEvent

protected ControllerEvent(Controller controller,
                          ControllerEvent.SubType subType,
                          DeviceComponent component,
                          long when,
                          long lastWhen)
Create a new event.

Parameters:
controller -
subType -
component -
when -
lastWhen -

ControllerEvent

protected ControllerEvent(ControllerEvent.SubType subType)
Creates a ControllerEvent with default values.

Method Detail

getSubType

public final ControllerEvent.SubType getSubType()

getController

public final Controller getController()
The Controller device, that caused the event.


toString

public abstract java.lang.String toString()

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

set

protected void set(Controller controller,
                   ControllerEvent.SubType subType,
                   DeviceComponent component,
                   long when,
                   long lastWhen)
Sets the fields of this ControllerEvent.


set

protected void set(ControllerEvent e)
Sets the fields of this ControllerEvent to match the given ControllerEvent.