|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KeyEventDispatcher
An instance of this interface coordinates with a KeyboardFocusManager to target and dispatch all key events. This allows retargeting, consuming, changing, or otherwise manipulating the key event before sending it on to a target.
By default, the KeyboardFocusManager is the sink for all key events not dispatched by other dispatchers. Therefore, it is unnecessary for the user to register the focus manager as a dispatcher.
KeyboardFocusManager.addKeyEventDispatcher(KeyEventDispatcher)
,
KeyboardFocusManager.removeKeyEventDispatcher(KeyEventDispatcher)
Method Summary | |
---|---|
boolean |
dispatchKeyEvent(KeyEvent e)
Called by the KeyboardFocusManager to request that a key event be dispatched. |
Method Detail |
---|
boolean dispatchKeyEvent(KeyEvent e)
redispatchEvent
to avoid infinite recursion.
If the return value is false, the KeyEvent is passed to the next dispatcher in the chain, ending with the KeyboardFocusManager. If the return value is true, the event has been consumed (although it might have been ignored), and no further action will be taken on the event. Be sure to check whether the event was consumed before dispatching it further.
e
- the key event
KeyboardFocusManager.redispatchEvent(Component, AWTEvent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |