| |
|
| java.lang.Object java.awt.KeyboardFocusManager java.awt.DefaultKeyboardFocusManager
Method Summary | |
void | clearMarkers() | protected synchronized 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 synchronized 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. | public 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.
DefaultKeyboardFocusManagers dispatch all FocusEvents, all WindowEvents
related to focus, and all KeyEvents. | public 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. | public void | downFocusCycle(Container aContainer) Moves the focus down one focus traversal cycle. | void | dumpMarkers() | protected synchronized void | enqueueKeyEvents(long after, Component untilFocused) Delays dispatching of KeyEvents until the specified Component becomes
the focus owner. | public void | focusNextComponent(Component aComponent) Focuses the Component after aComponent, typically based on a
FocusTraversalPolicy. | public void | focusPreviousComponent(Component aComponent) Focuses the Component before aComponent, typically based on a
FocusTraversalPolicy. | public boolean | postProcessKeyEvent(KeyEvent e) This method will be called by dispatchKeyEvent . | public 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. | static boolean | sendMessage(Component target, AWTEvent e) Sends a synthetic AWTEvent to a Component. | public void | upFocusCycle(Component aComponent) Moves the focus up one focus traversal cycle. |
clearMarkers | void clearMarkers()(Code) | | Clears markers queue
since: 1.5 |
dequeueKeyEvents | protected synchronized void dequeueKeyEvents(long after, Component untilFocused)(Code) | | 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.
If the given timestamp is less than zero, the outstanding enqueue
request for the given Component with the oldest timestamp (if
any) should be cancelled.
Parameters: after - the timestamp specified in the call toenqueueKeyEvents , or any value < 0 Parameters: untilFocused - the Component specified in the call toenqueueKeyEvents See Also: DefaultKeyboardFocusManager.enqueueKeyEvents See Also: DefaultKeyboardFocusManager.discardKeyEvents |
dispatchEvent | public boolean dispatchEvent(AWTEvent e)(Code) | | This method is called by the AWT event dispatcher requesting that the
current KeyboardFocusManager dispatch the specified event on its behalf.
DefaultKeyboardFocusManagers dispatch all FocusEvents, all WindowEvents
related to focus, and all KeyEvents. These events are dispatched based
on the KeyboardFocusManager's notion of the focus owner and the focused
and active Windows, sometimes overriding the source of the specified
AWTEvent. If this method returns false , then the AWT event
dispatcher will attempt to dispatch the event itself.
Parameters: e - the AWTEvent to be dispatched true if this method dispatched the event;false otherwise |
dispatchKeyEvent | public boolean dispatchKeyEvent(KeyEvent e)(Code) | | Called by dispatchEvent if no other
KeyEventDispatcher in the dispatcher chain dispatched the KeyEvent, or
if no other KeyEventDispatchers are registered. If the event has not
been consumed, its target is enabled, and the focus owner is not null,
this method dispatches the event to its target. This method will also
subsequently dispatch the event to all registered
KeyEventPostProcessors. After all this operations are finished,
the event is passed to peers for processing.
In all cases, this method returns true , since
DefaultKeyboardFocusManager is designed so that neither
dispatchEvent , nor the AWT event dispatcher, should take
further action on the event in any situation.
Parameters: e - the KeyEvent to be dispatched true See Also: Component.dispatchEvent |
downFocusCycle | public void downFocusCycle(Container aContainer)(Code) | | Moves the focus down one focus traversal cycle. If aContainer is a focus
cycle root, then the focus owner is set to aContainer's default
Component to focus, and the current focus cycle root is set to
aContainer. If aContainer is not a focus cycle root, then no focus
traversal operation occurs.
Parameters: aContainer - the Container that is the basis for the focustraversal operation See Also: Container.transferFocusDownCycle |
dumpMarkers | void dumpMarkers()(Code) | | Dumps the list of type-ahead queue markers to stderr
|
enqueueKeyEvents | protected synchronized void enqueueKeyEvents(long after, Component untilFocused)(Code) | | Delays dispatching of KeyEvents until the specified Component becomes
the focus owner. KeyEvents with timestamps later than the specified
timestamp will be enqueued until the specified Component receives a
FOCUS_GAINED event, or the AWT cancels the delay request by invoking
dequeueKeyEvents or discardKeyEvents .
Parameters: after - timestamp of current event, or the current, system time ifthe current event has no timestamp, or the AWT cannot determinewhich event is currently being handled Parameters: untilFocused - Component which will receive a FOCUS_GAINED eventbefore any pending KeyEvents See Also: DefaultKeyboardFocusManager.dequeueKeyEvents See Also: DefaultKeyboardFocusManager.discardKeyEvents |
focusNextComponent | public void focusNextComponent(Component aComponent)(Code) | | Focuses the Component after aComponent, typically based on a
FocusTraversalPolicy.
Parameters: aComponent - the Component that is the basis for the focustraversal operation See Also: FocusTraversalPolicy See Also: Component.transferFocus |
postProcessKeyEvent | public boolean postProcessKeyEvent(KeyEvent e)(Code) | | This method will be called by dispatchKeyEvent . It will
handle any unconsumed KeyEvents that map to an AWT
MenuShortcut by consuming the event and activating the
shortcut.
Parameters: e - the KeyEvent to post-process true See Also: DefaultKeyboardFocusManager.dispatchKeyEvent See Also: MenuShortcut |
processKeyEvent | public void processKeyEvent(Component focusedComponent, KeyEvent e)(Code) | | This method initiates a focus traversal operation if and only if the
KeyEvent represents a focus traversal key for the specified
focusedComponent. It is expected that focusedComponent is the current
focus owner, although this need not be the case. If it is not,
focus traversal will nevertheless proceed as if focusedComponent
were the focus owner.
Parameters: focusedComponent - the Component that is the basis for a focustraversal operation if the specified event represents a focustraversal key for the Component Parameters: e - the event that may represent a focus traversal key |
sendMessage | static boolean sendMessage(Component target, AWTEvent e)(Code) | | Sends a synthetic AWTEvent to a Component. If the Component is in
the current AppContext, then the event is immediately dispatched.
If the Component is in a different AppContext, then the event is
posted to the other AppContext's EventQueue, and this method blocks
until the event is handled or target AppContext is disposed.
Returns true if successfuly dispatched event, false if failed
to dispatch.
|
upFocusCycle | public void upFocusCycle(Component aComponent)(Code) | | Moves the focus up one focus traversal cycle. Typically, the focus owner
is set to aComponent's focus cycle root, and the current focus cycle
root is set to the new focus owner's focus cycle root. If, however,
aComponent's focus cycle root is a Window, then the focus owner is set
to the focus cycle root's default Component to focus, and the current
focus cycle root is unchanged.
Parameters: aComponent - the Component that is the basis for the focustraversal operation See Also: Component.transferFocusUpCycle |
Methods inherited from java.awt.KeyboardFocusManager | public void addKeyEventDispatcher(KeyEventDispatcher dispatcher)(Code)(Java Doc) public void addKeyEventPostProcessor(KeyEventPostProcessor processor)(Code)(Java Doc) public void addPropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public void addVetoableChangeListener(VetoableChangeListener listener)(Code)(Java Doc) public void addVetoableChangeListener(String propertyName, VetoableChangeListener listener)(Code)(Java Doc) public void clearGlobalFocusOwner()(Code)(Java Doc) void clearMarkers()(Code)(Java Doc) static void clearMostRecentFocusOwner(Component comp)(Code)(Java Doc) abstract protected void dequeueKeyEvents(long after, Component untilFocused)(Code)(Java Doc) abstract protected void discardKeyEvents(Component comp)(Code)(Java Doc) abstract public boolean dispatchEvent(AWTEvent e)(Code)(Java Doc) abstract public boolean dispatchKeyEvent(KeyEvent e)(Code)(Java Doc) abstract public void downFocusCycle(Container aContainer)(Code)(Java Doc) final public void downFocusCycle()(Code)(Java Doc) void dumpRequests()(Code)(Java Doc) abstract protected void enqueueKeyEvents(long after, Component untilFocused)(Code)(Java Doc) protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code)(Java Doc) protected void fireVetoableChange(String propertyName, Object oldValue, Object newValue) throws PropertyVetoException(Code)(Java Doc) abstract public void focusNextComponent(Component aComponent)(Code)(Java Doc) final public void focusNextComponent()(Code)(Java Doc) abstract public void focusPreviousComponent(Component aComponent)(Code)(Java Doc) final public void focusPreviousComponent()(Code)(Java Doc) public Window getActiveWindow()(Code)(Java Doc) public Container getCurrentFocusCycleRoot()(Code)(Java Doc) public static KeyboardFocusManager getCurrentKeyboardFocusManager()(Code)(Java Doc) static synchronized KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext appcontext)(Code)(Java Doc) final SequencedEvent getCurrentSequencedEvent()(Code)(Java Doc) Component getCurrentWaitingRequest(Component parent)(Code)(Java Doc) public Set<AWTKeyStroke> getDefaultFocusTraversalKeys(int id)(Code)(Java Doc) public synchronized FocusTraversalPolicy getDefaultFocusTraversalPolicy()(Code)(Java Doc) public Component getFocusOwner()(Code)(Java Doc) public Window getFocusedWindow()(Code)(Java Doc) protected Window getGlobalActiveWindow() throws SecurityException(Code)(Java Doc) protected Container getGlobalCurrentFocusCycleRoot() throws SecurityException(Code)(Java Doc) protected Component getGlobalFocusOwner() throws SecurityException(Code)(Java Doc) protected Window getGlobalFocusedWindow() throws SecurityException(Code)(Java Doc) protected Component getGlobalPermanentFocusOwner() throws SecurityException(Code)(Java Doc) static Component getHeavyweight(Component comp)(Code)(Java Doc) protected synchronized java.util.List<KeyEventDispatcher> getKeyEventDispatchers()(Code)(Java Doc) protected java.util.List<KeyEventPostProcessor> getKeyEventPostProcessors()(Code)(Java Doc) static synchronized Component getMostRecentFocusOwner(Window window)(Code)(Java Doc) Component getNativeFocusOwner()(Code)(Java Doc) Window getNativeFocusedWindow()(Code)(Java Doc) public Component getPermanentFocusOwner()(Code)(Java Doc) public synchronized PropertyChangeListener[] getPropertyChangeListeners()(Code)(Java Doc) public synchronized PropertyChangeListener[] getPropertyChangeListeners(String propertyName)(Code)(Java Doc) public synchronized VetoableChangeListener[] getVetoableChangeListeners()(Code)(Java Doc) public synchronized VetoableChangeListener[] getVetoableChangeListeners(String propertyName)(Code)(Java Doc) static void heavyweightButtonDown(Component heavyweight, long time)(Code)(Java Doc) static void heavyweightButtonDown(Component heavyweight, long time, boolean acceptDuplicates)(Code)(Java Doc) static Set initFocusTraversalKeysSet(String value, Set targetSet)(Code)(Java Doc) static boolean isAutoFocusTransferEnabled()(Code)(Java Doc) static boolean isProxyActive(KeyEvent e)(Code)(Java Doc) static Window markClearGlobalFocusOwner()(Code)(Java Doc) abstract public boolean postProcessKeyEvent(KeyEvent e)(Code)(Java Doc) static void processCurrentLightweightRequests()(Code)(Java Doc) abstract public void processKeyEvent(Component focusedComponent, KeyEvent e)(Code)(Java Doc) static boolean processSynchronousLightweightTransfer(Component heavyweight, Component descendant, boolean temporary, boolean focusedWindowChangeAllowed, long time)(Code)(Java Doc) final public void redispatchEvent(Component target, AWTEvent e)(Code)(Java Doc) static boolean removeFirstRequest()(Code)(Java Doc) public void removeKeyEventDispatcher(KeyEventDispatcher dispatcher)(Code)(Java Doc) public void removeKeyEventPostProcessor(KeyEventPostProcessor processor)(Code)(Java Doc) static void removeLastFocusRequest(Component heavyweight)(Code)(Java Doc) public void removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public void removeVetoableChangeListener(VetoableChangeListener listener)(Code)(Java Doc) public void removeVetoableChangeListener(String propertyName, VetoableChangeListener listener)(Code)(Java Doc) static AWTEvent retargetFocusEvent(AWTEvent event)(Code)(Java Doc) static FocusEvent retargetFocusGained(FocusEvent fe)(Code)(Java Doc) static FocusEvent retargetFocusLost(FocusEvent fe)(Code)(Java Doc) static FocusEvent retargetUnexpectedFocusEvent(FocusEvent fe)(Code)(Java Doc) public static void setCurrentKeyboardFocusManager(KeyboardFocusManager newManager) throws SecurityException(Code)(Java Doc) final void setCurrentSequencedEvent(SequencedEvent current)(Code)(Java Doc) public void setDefaultFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)(Code)(Java Doc) public void setDefaultFocusTraversalPolicy(FocusTraversalPolicy defaultPolicy)(Code)(Java Doc) protected void setGlobalActiveWindow(Window activeWindow)(Code)(Java Doc) public void setGlobalCurrentFocusCycleRoot(Container newFocusCycleRoot)(Code)(Java Doc) protected void setGlobalFocusOwner(Component focusOwner)(Code)(Java Doc) protected void setGlobalFocusedWindow(Window focusedWindow)(Code)(Java Doc) protected void setGlobalPermanentFocusOwner(Component permanentFocusOwner)(Code)(Java Doc) static void setMostRecentFocusOwner(Component component)(Code)(Java Doc) static synchronized void setMostRecentFocusOwner(Window window, Component component)(Code)(Java Doc) void setNativeFocusOwner(Component comp)(Code)(Java Doc) static int shouldNativelyFocusHeavyweight(Component heavyweight, Component descendant, boolean temporary, boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)(Code)(Java Doc) abstract public void upFocusCycle(Component aComponent)(Code)(Java Doc) final public void upFocusCycle()(Code)(Java Doc)
|
|
|
|