Package com.ardor3d.input.awt
Class AwtKeyboardWrapper
java.lang.Object
com.ardor3d.input.awt.AwtKeyboardWrapper
- All Implemented Interfaces:
KeyboardWrapper
,KeyListener
,EventListener
Keyboard wrapper class for use with AWT.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ardor3d.input.KeyboardWrapper
KeyboardWrapper.KeyboardIterator
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Component
protected boolean
protected KeyboardWrapper.KeyboardIterator
Fields inherited from interface com.ardor3d.input.KeyboardWrapper
_upcomingEvents
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConvert from AWT key event to Ardor3D Key.Returns a peeking iterator that allows the client to loop through all keyboard events that have not yet been handled.void
init()
Allows the keyboard wrapper implementation to initialise itself.boolean
void
void
void
void
setConsumeEvents
(boolean consumeEvents)
-
Field Details
-
_currentIterator
-
_component
-
_consumeEvents
protected boolean _consumeEvents -
_pressedList
-
-
Constructor Details
-
AwtKeyboardWrapper
-
-
Method Details
-
init
public void init()Description copied from interface:KeyboardWrapper
Allows the keyboard wrapper implementation to initialise itself.- Specified by:
init
in interfaceKeyboardWrapper
-
getEvents
Description copied from interface:KeyboardWrapper
Returns a peeking iterator that allows the client to loop through all keyboard events that have not yet been handled.- Specified by:
getEvents
in interfaceKeyboardWrapper
- Returns:
- an iterator that allows the client to check which events have still not been handled
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-
fromKeyEventToKey
Convert from AWT key event to Ardor3D Key. Override to provide additional or custom behavior.- Parameters:
e
- the AWT KeyEvent received by the input system.- Returns:
- an Ardor3D Key, to be forwarded to the Predicate/Trigger system.
-
isConsumeEvents
public boolean isConsumeEvents() -
setConsumeEvents
public void setConsumeEvents(boolean consumeEvents)
-