org.jagatoo.input.events
Class InputEvent

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

public abstract class InputEvent
extends java.lang.Object

This is the abstract base class for all input events like keyboard-, mouse- and controller-events.


Nested Class Summary
static class InputEvent.Type
           
 
Constructor Summary
InputEvent(InputEvent.Type type, DeviceComponent component, long when, long lastWhen)
           
 
Method Summary
 DeviceComponent getComponent()
           
 long getLastWhen()
          The time the last event occured (if a timestamps are being used).
 InputEvent.Type getType()
           
 long getWhen()
           
protected  void set(DeviceComponent component, long when, long lastWhen)
           
protected  void set(InputEvent e)
           
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputEvent

public InputEvent(InputEvent.Type type,
                  DeviceComponent component,
                  long when,
                  long lastWhen)
Method Detail

getType

public final InputEvent.Type getType()

getComponent

public final DeviceComponent getComponent()
Returns:
the DeviceComponent, that triggered this event.

getWhen

public final long getWhen()
Returns:
the time that the event occured (if a timestamps are being used).

getLastWhen

public final long getLastWhen()
The time the last event occured (if a timestamps are being used).


toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
in formation about this InputEvent as a String.

set

protected void set(DeviceComponent component,
                   long when,
                   long lastWhen)

set

protected void set(InputEvent e)