|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface KeyManager
Defines a common abstraction for classes that handle key events.
It prescribes a stack mechanism for managing KeyHandlers.
| Method Summary | |
|---|---|
void |
enableKeyHandler(KeyHandler keyHandler)
Enables the given KeyHandler. |
KeyHandler |
getCurrentKeyHandler()
Returns the current KeyHandler or null if no
handler is set. |
KeyHandler[] |
getFallbackKeyHandlers()
Returns an array of additional KeyHandlers to call for a given
KeyEvent, if the current event handler doesn't handle it. |
void |
pushKeyHandler(KeyHandler keyHandler)
Enables the given KeyHandler, and pushes it on the stack so that if
another KeyHandler gets enabled, this one will be reenabled when
that KeyHandler is removed. |
void |
removeKeyHandler(KeyHandler keyHandler)
Removes the given KeyHandler and reinstates the KeyHandler at the
top of the stack, if any. |
boolean |
replaceKeyHandler(KeyHandler existingHandler,
KeyHandler replacementHandler)
Replaces a KeyHandler in the stack with another KeyHandler. |
| Method Detail |
|---|
void enableKeyHandler(KeyHandler keyHandler)
KeyHandler. This KeyManager
then passes events only to the given KeyHandler until it is
either removed or another KeyHandler is enabled.
keyHandler - the new KeyHandler to enable.void pushKeyHandler(KeyHandler keyHandler)
KeyHandler, and pushes it on the stack so that if
another KeyHandler gets enabled, this one will be reenabled when
that KeyHandler is removed.
keyHandler - The KeyHandler to enable and push.enableKeyHandler(org.opengis.go.display.event.KeyHandler)void removeKeyHandler(KeyHandler keyHandler)
KeyHandler and reinstates the KeyHandler at the
top of the stack, if any.
keyHandler - the KeyHandler to disable and remove.
boolean replaceKeyHandler(KeyHandler existingHandler,
KeyHandler replacementHandler)
KeyHandler in the stack with another KeyHandler.
existingHandler - the KeyHandler to be replaced.replacementHandler - the KeyHandler that is replacing
the existingHandler.
true if existingHandler was found and
replaced by replacementHandler.KeyHandler getCurrentKeyHandler()
KeyHandler or null if no
handler is set.
KeyHandler or null.KeyHandler[] getFallbackKeyHandlers()
KeyHandlers to call for a given
KeyEvent, if the current event handler doesn't handle it. These
handlers will be called in ascending index order until the KeyEvent
is consumed.
KeyHandlers.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||