|
Sharkysoft home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.event.KeyAdapter
|
+--lava.gui.KeystrokeBuffer
Buffers component keystrokes.
Details: A KeystrokeBuffer is a KeyAdapter that listens for and buffers all keyTyped calls. Calls to getKey return the next buffered character, or block until a character is typed. This class is thread-safe.
| Field Summary | |
protected FifoQueue |
queue
The keyTyped buffer. |
| Constructor Summary | |
KeystrokeBuffer()
Constructs an instance of KeystrokeBuffer. |
|
| Method Summary | |
int |
getKey()
Returns the next character in the buffer, or blocks for a character if the queue is empty. |
void |
keyTyped(java.awt.event.KeyEvent e)
Converts the given KeyEvent into a character and stored it in the buffer. |
| Methods inherited from class java.awt.event.KeyAdapter |
keyPressed, keyReleased |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected FifoQueue queue
| Constructor Detail |
public KeystrokeBuffer()
KeystrokeBuffer.| Method Detail |
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped in class java.awt.event.KeyAdaptere - the KeyEventpublic int getKey()
|
Sharkysoft home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||