|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectteamdev.jxdesktop.Keyboard
Represents the system keyboard that allows listening all global keyboard events.
TheKeyboard
class provides functionality that allows
listening keyboard events such as KeyEvent.KEY_PRESSED or
KeyEvent.KEY_RELEASED for the current process and for other
processes that are running in system.
Constructor Summary | |
protected |
Keyboard()
|
Method Summary | |
void |
addKeyListener(java.awt.event.KeyListener listener)
Adds the specified key listener to receive system key events. |
static Keyboard |
createKeyboard()
Creates a new instance of system keyboard. |
void |
dispose()
Disposes of the system keyboard. |
protected void |
fireKeyPressed(java.awt.event.KeyEvent e)
|
protected void |
fireKeyReleased(java.awt.event.KeyEvent e)
|
protected void |
fireKeyTyped(java.awt.event.KeyEvent e)
|
java.awt.event.KeyListener[] |
getKeyListeners()
Returns an array of all the key listeners registered. |
protected void |
processEvent(java.awt.event.KeyEvent e)
|
void |
removeKeyListener(java.awt.event.KeyListener listener)
Removes the specified key listener so that it no longer receives system key events. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Keyboard()
Method Detail |
public static Keyboard createKeyboard()
Keyboard.dispose()
method.
java.lang.RuntimeException
- when the current operation system is
not supported. Currently supported
platforms are Windows XP, 2003, Vista
and Mac OS X 10.5.+dispose()
public void addKeyListener(java.awt.event.KeyListener listener)
listener
is null, no exception is thrown
and no action is performed.
listener
- the key listenerpublic void removeKeyListener(java.awt.event.KeyListener listener)
listener
- the key listenerpublic java.awt.event.KeyListener[] getKeyListeners()
KeyListener
s
or an empty array if no key
listeners are currently registeredpublic void dispose()
protected void fireKeyPressed(java.awt.event.KeyEvent e)
protected void fireKeyReleased(java.awt.event.KeyEvent e)
protected void fireKeyTyped(java.awt.event.KeyEvent e)
protected void processEvent(java.awt.event.KeyEvent e)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |