|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jagatoo.input.devices.InputDevice
org.jagatoo.input.devices.Keyboard
org.jagatoo.input.impl.lwjgl.LWJGLKeyboard
public class LWJGLKeyboard
LWJGL implementation of the Keyboard class.
| Constructor Summary | |
|---|---|
protected |
LWJGLKeyboard(KeyboardFactory factory,
InputSourceWindow sourceWindow,
EventQueue eventQueue)
|
| Method Summary | |
|---|---|
void |
collectEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime)
Processes pending events from the system and places them into the EventQueue. |
protected void |
collectOrFireEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime,
boolean acceptsEvents)
|
void |
consumePendingEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime)
Processes pending events from the system and simply wastes them. |
static Key |
convertKey(int lwjglKey,
char keyChar)
|
void |
destroyImpl()
Destroys the Keyboard. |
protected boolean |
hasKeyStateChanged(Key key,
boolean keyState)
This method is asked by the Keyboard.fireOnKeyPressed(KeyPressedEvent, boolean)
and Keyboard.fireOnKeyReleased(KeyReleasedEvent, boolean) methods
and listeners are not notified, if this method returns false. |
void |
onDeviceRegistered(InputSystem inputSystem)
This method is called by the InputSystem after the device has been completely and successfully registered. |
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 org.jagatoo.input.devices.Keyboard |
|---|
addKeyboardListener, applyModifier, destroy, fireKeyboardEvent, fireOnKeyPressed, fireOnKeyReleased, fireOnKeyTyped, getKeyState, getModifierMask, getSourceFactory, getState, hasKeyboardListener, hasListener, isKeyPressed, prepareKeyPressedEvent, prepareKeyReleasedEvent, prepareKeyTypedEvent, removeKeyboardListener, toString |
| Methods inherited from class org.jagatoo.input.devices.InputDevice |
|---|
addInputStateListener, equals, fireStateEventsAndDoActions, getEventQueue, getName, getSourceWindow, hasInputStateListener, isEnabled, onDeviceUnregistered, removeInputStateListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected LWJGLKeyboard(KeyboardFactory factory,
InputSourceWindow sourceWindow,
EventQueue eventQueue)
throws InputSystemException
InputSystemException| Method Detail |
|---|
public static final Key convertKey(int lwjglKey,
char keyChar)
protected boolean hasKeyStateChanged(Key key,
boolean keyState)
Keyboard.fireOnKeyPressed(KeyPressedEvent, boolean)
and Keyboard.fireOnKeyReleased(KeyReleasedEvent, boolean) methods
and listeners are not notified, if this method returns false.
hasKeyStateChanged in class Keyboard
protected final void collectOrFireEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime,
boolean acceptsEvents)
throws InputSystemException
InputSystemException
public void consumePendingEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime)
throws InputSystemException
InputDevice.update(InputSystem, EventQueue, long) method,
if the device is disabled or its InputSourceWindow doesn't currently
receive input events.
consumePendingEvents in class InputDeviceInputSystemException
public void collectEvents(InputSystem is,
EventQueue eventQueue,
long nanoTime)
throws InputSystemException
InputDevice.update(InputSystem, EventQueue, long)
method is invoked.
collectEvents in class InputDeviceInputSystemException
public void update(InputSystem is,
EventQueue eventQueue,
long nanoTime)
throws InputSystemException
InputDevice.collectEvents(InputSystem, EventQueue, long)
method placed events into it.
update in class InputDeviceInputSystemException
public void onDeviceRegistered(InputSystem inputSystem)
throws InputSystemException
onDeviceRegistered in class InputDeviceInputSystemException
public void destroyImpl()
throws InputSystemException
destroyImpl in class KeyboardInputSystemException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||