|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.control.KeyboardController
public abstract class KeyboardController
An observer of all KeyEvents, forwarding them to registered listeners. The listeners are only informed about events that occurred in a part of the dock-tree below them.
Constructor Summary | |
---|---|
KeyboardController(DockController controller)
Creates a new KeyboardController . |
Method Summary | |
---|---|
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. |
abstract void |
kill()
Stops this controller. |
void |
removeGlobalListener(KeyListener listener)
Removes a listener from this controller. |
void |
removeListener(KeyboardListener listener)
Removes a listener from this controller. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyboardController(DockController controller)
KeyboardController
.
controller
- the controller in whose realm this KeyBoardController
will work.Method Detail |
---|
public void addGlobalListener(KeyListener listener)
KeyListener
s
will receive a notification for every event that this controller handles.
The listeners will also be informed about events that are consumed.
listener
- the new listenerpublic void removeGlobalListener(KeyListener listener)
listener
- the listener to removepublic void addListener(KeyboardListener listener)
KeyEvent
occurs in the subtree below
the listeners DockElement
.
listener
- the new listenerpublic void removeListener(KeyboardListener listener)
listener
- the listener to removepublic DockController getController()
DockController
in whose realm this KeyboardController
works.
public abstract void kill()
protected 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 send
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |