public abstract class AbstractKeyboardController extends Object implements KeyboardController
KeyboardController offering methods to store and call
KeyboardListeners.| Constructor and Description |
|---|
AbstractKeyboardController(DockController controller)
Creates a new
KeyboardController. |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalListener(KeyListener listener)
Adds a global key listener to this controller.
|
void |
addListener(KeyboardListener listener)
Adds a listener to this controller.
|
protected void |
fireKeyPressed(KeyEvent event)
Forwards
event to all listeners whose
DockElement is above the component
on which the event occurred. |
protected void |
fireKeyReleased(KeyEvent event)
Forwards
event to all listeners whose
DockElement is above the component
on which the event occurred. |
protected void |
fireKeyTyped(KeyEvent event)
Forwards
event to all listeners whose
DockElement is above the component
on which the event occurred. |
DockController |
getController()
Gets the
DockController in whose realm this KeyboardController works. |
void |
removeGlobalListener(KeyListener listener)
Removes a listener from this controller.
|
void |
removeListener(KeyboardListener listener)
Removes a listener from this controller.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitkillpublic AbstractKeyboardController(DockController controller)
KeyboardController.controller - the controller in whose realm this KeyBoardController
will work.public void addGlobalListener(KeyListener listener)
KeyboardControllerKeyListeners
will receive a notification for every event that this controller handles.
The listeners will also be informed about events that are consumed.addGlobalListener in interface KeyboardControllerlistener - the new listenerpublic void removeGlobalListener(KeyListener listener)
KeyboardControllerremoveGlobalListener in interface KeyboardControllerlistener - the listener to removepublic void addListener(KeyboardListener listener)
KeyboardControllerKeyEvent occurs in the subtree below
the listeners DockElement.addListener in interface KeyboardControllerlistener - the new listenerpublic void removeListener(KeyboardListener listener)
KeyboardControllerremoveListener in interface KeyboardControllerlistener - the listener to removepublic DockController getController()
KeyboardControllerDockController in whose realm this KeyboardController works.getController in interface KeyboardControllerprotected void fireKeyPressed(KeyEvent event)
event to all listeners whose
DockElement is above the component
on which the event occurred.event - the event to sendprotected void fireKeyReleased(KeyEvent event)
event to all listeners whose
DockElement is above the component
on which the event occurred.event - the event to sendprotected void fireKeyTyped(KeyEvent event)
event to all listeners whose
DockElement is above the component
on which the event occurred.event - the event to sendCopyright © 2017 Docking Frames. All rights reserved.