|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jagatoo.input.devices.InputDevice
public abstract class InputDevice
This is the (very) base-class for all input device implementations.
Instances can only be created/retrieved through an InputDeviceFactory.
| Constructor Summary | |
|---|---|
InputDevice(InputSourceWindow sourceWindow,
EventQueue eventQueue,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
addInputStateListener(InputStateListener l)
Adds a new InputStateListener to the list of notified instances. |
abstract void |
collectEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime)
Processes pending events from the system and places them into the EventQueue. |
abstract void |
consumePendingEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime)
Processes pending events from the system and simply wastes them. |
abstract void |
destroy()
Destroys the InputDevice. |
boolean |
equals(java.lang.Object o)
|
void |
fireStateEventsAndDoActions(InputEvent e,
int delta,
int state)
|
protected EventQueue |
getEventQueue()
|
java.lang.String |
getName()
|
InputSourceWindow |
getSourceWindow()
|
abstract int |
getState(DeviceComponent component)
This method returns an abstract input-state for the given DeviceComponent. |
boolean |
hasInputStateListener()
|
boolean |
isEnabled()
|
void |
onDeviceRegistered(InputSystem inputSystem)
This method is called by the InputSystem after the device has been completely and successfully registered. |
void |
onDeviceUnregistered(InputSystem inputSystem)
This method is called by the InputSystem after the device has been completely and successfully deregistered. |
void |
removeInputStateListener(InputStateListener l)
Removes an InputStateListener from the list of notified instances. |
void |
setEnabled(boolean enabled)
Enables of disables this object. |
abstract void |
update(InputSystem is,
EventQueue eventQueue,
long nanoTime)
Processes pending events from the system and directly fires them (notifes the listeners). |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InputDevice(InputSourceWindow sourceWindow,
EventQueue eventQueue,
java.lang.String name)
throws InputSystemException
InputSystemException| Method Detail |
|---|
public final InputSourceWindow getSourceWindow()
InputSourceWindow, this device is bound to.protected final EventQueue getEventQueue()
public final java.lang.String getName()
public void onDeviceRegistered(InputSystem inputSystem)
throws InputSystemException
inputSystem -
InputSystemException
public void onDeviceUnregistered(InputSystem inputSystem)
throws InputSystemException
inputSystem -
InputSystemException
public abstract int getState(DeviceComponent component)
throws InputSystemRuntimeException
component -
InputSystemRuntimeExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic void setEnabled(boolean enabled)
setEnabled in interface Enableablepublic final boolean isEnabled()
isEnabled in interface Enableablepublic final boolean hasInputStateListener()
InputStateListener is currently registered.public void addInputStateListener(InputStateListener l)
InputStateListener to the list of notified instances.
l - public void removeInputStateListener(InputStateListener l)
InputStateListener from the list of notified instances.
l -
public void fireStateEventsAndDoActions(InputEvent e,
int delta,
int state)
public abstract void consumePendingEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime)
throws InputSystemException
update(InputSystem, EventQueue, long) method,
if the device is disabled or its InputSourceWindow doesn't currently
receive input events.
is - eventQueue - nanoTime -
InputSystemException
public abstract void collectEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime)
throws InputSystemException
update(InputSystem, EventQueue, long)
method is invoked.
is - eventQueue - nanoTime -
InputSystemException
public abstract void update(InputSystem is,
EventQueue eventQueue,
long nanoTime)
throws InputSystemException
collectEvents(InputSystem, EventQueue, long)
method placed events into it.
is - eventQueue - nanoTime -
InputSystemException
public abstract void destroy()
throws InputSystemException
InputSystemException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||