java.awt
Class DefaultKeyboardFocusManagerjava.lang.Object | +--java.awt.KeyboardFocusManager | +--java.awt.DefaultKeyboardFocusManager
- All Implemented Interfaces:
- KeyEventDispatcher, KeyEventPostProcessor
- Direct Known Subclasses:
- FocusManager
- public class DefaultKeyboardFocusManager
- extends KeyboardFocusManager
The default KeyboardFocusManager for AWT applications. Focus traversal is done in response to a Component's focus traversal keys, and using a Container's FocusTraversalPolicy.
- Since:
- 1.4
- See Also:
- FocusTraversalPolicy, Component.setFocusTraversalKeys(int, java.util.Set), Component.getFocusTraversalKeys(int)
Field Summary
Fields inherited from class java.awt.KeyboardFocusManager BACKWARD_TRAVERSAL_KEYS, DOWN_CYCLE_TRAVERSAL_KEYS, FORWARD_TRAVERSAL_KEYS, UP_CYCLE_TRAVERSAL_KEYS
Constructor Summary
DefaultKeyboardFocusManager()
Method Summary
protected void dequeueKeyEvents(long after, Component untilFocused)
Releases for normal dispatching to the current focus owner all KeyEvents which were enqueued because of a call to enqueueKeyEvents with the same timestamp and Component.protected void discardKeyEvents(Component comp)
Discards all KeyEvents which were enqueued because of one or more calls to enqueueKeyEvents with the specified Component, or one of its descendants.boolean dispatchEvent(AWTEvent e)
This method is called by the AWT event dispatcher requesting that the current KeyboardFocusManager dispatch the specified event on its behalf.boolean dispatchKeyEvent(KeyEvent e)
Called by dispatchEvent if no other KeyEventDispatcher in the dispatcher chain dispatched the KeyEvent, or if no other KeyEventDispatchers are registered.void downFocusCycle(Container aContainer)
Moves the focus down one focus traversal cycle.protected void enqueueKeyEvents(long after, Component untilFocused)
Delays dispatching of KeyEvents until the specified Component becomes the focus owner.void focusNextComponent(Component aComponent)
Focuses the Component after aComponent, typically based on a FocusTraversalPolicy.void focusPreviousComponent(Component aComponent)
Focuses the Component before aComponent, typically based on a FocusTraversalPolicy.boolean postProcessKeyEvent(KeyEvent e)
This method will be called by dispatchKeyEvent.void processKeyEvent(Component focusedComponent, KeyEvent e)
This method initiates a focus traversal operation if and only if the KeyEvent represents a focus traversal key for the specified focusedComponent.void upFocusCycle(Component aComponent)
Moves the focus up one focus traversal cycle.