org.jagatoo.input.events
Class InputEvent
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
InputEvent
public InputEvent(InputEvent.Type type,
DeviceComponent component,
long when,
long lastWhen)
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)