Class DefaultKeyboardFocusManager
- java.lang.Object
- 
- java.awt.KeyboardFocusManager
- 
- java.awt.DefaultKeyboardFocusManager
 
 
- 
- All Implemented Interfaces:
- KeyEventDispatcher, KeyEventPostProcessor
 public class DefaultKeyboardFocusManager extends KeyboardFocusManagerThe default KeyboardFocusManager for AWT applications. Focus traversal is done in response to a Component's focus traversal keys, and using a Container's FocusTraversalPolicy.Please see How to Use the Focus Subsystem, a section in The Java Tutorial, and the Focus Specification for more information. 
- 
- 
Static Methods Modifier and Type Static Method and Description  getCurrentKeyboardFocusManager   static KeyboardFocusManagergetCurrentKeyboardFocusManager()Returns the current KeyboardFocusManager instance for the calling thread's context.public static KeyboardFocusManager getCurrentKeyboardFocusManager()- 
Description copied from class:KeyboardFocusManagerReturns the current KeyboardFocusManager instance for the calling thread's context.- Returns:
- this thread's context's KeyboardFocusManager
- See Also:
- KeyboardFocusManager.setCurrentKeyboardFocusManager(java.awt.KeyboardFocusManager)
 
  setCurrentKeyboardFocusManager   static voidsetCurrentKeyboardFocusManager(KeyboardFocusManager newManager)Sets the current KeyboardFocusManager instance for the calling thread's context.public static void setCurrentKeyboardFocusManager(KeyboardFocusManager newManager) throws java.lang.SecurityException- 
Description copied from class:KeyboardFocusManagerSets the current KeyboardFocusManager instance for the calling thread's context. If null is specified, then the current KeyboardFocusManager is replaced with a new instance of DefaultKeyboardFocusManager.If a SecurityManager is installed, the calling thread must be granted the AWTPermission "replaceKeyboardFocusManager" in order to replace the the current KeyboardFocusManager. If this permission is not granted, this method will throw a SecurityException, and the current KeyboardFocusManager will be unchanged. - Parameters:
- newManager- the new KeyboardFocusManager for this thread's context
- Throws:
- java.lang.SecurityException- if the calling thread does not have permission to replace the current KeyboardFocusManager
- See Also:
- KeyboardFocusManager.getCurrentKeyboardFocusManager(),- DefaultKeyboardFocusManager
 
 
- 
 - 
Constructors Constructor and Description  DefaultKeyboardFocusManager   DefaultKeyboardFocusManager()public DefaultKeyboardFocusManager() DefaultKeyboardFocusManager()public DefaultKeyboardFocusManager()
 - 
Methods Modifier and Type Method and Description  addKeyEventDispatcher   voidaddKeyEventDispatcher(KeyEventDispatcher dispatcher)Adds a KeyEventDispatcher to this KeyboardFocusManager's dispatcher chain.public void addKeyEventDispatcher(KeyEventDispatcher dispatcher)- 
Description copied from class:KeyboardFocusManagerAdds a KeyEventDispatcher to this KeyboardFocusManager's dispatcher chain. This KeyboardFocusManager will request that each KeyEventDispatcher dispatch KeyEvents generated by the user before finally dispatching the KeyEvent itself. KeyEventDispatchers will be notified in the order in which they were added. Notifications will halt as soon as one KeyEventDispatcher returnstruefrom itsdispatchKeyEventmethod. There is no limit to the total number of KeyEventDispatchers which can be added, nor to the number of times which a particular KeyEventDispatcher instance can be added.If a null dispatcher is specified, no action is taken and no exception is thrown. In a multithreaded application, KeyEventDispatcherbehaves the same as other AWT listeners. See AWT Threading Issues for more details.- Parameters:
- dispatcher- the KeyEventDispatcher to add to the dispatcher chain
- See Also:
- KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher)
 
  addKeyEventPostProcessor   voidaddKeyEventPostProcessor(KeyEventPostProcessor processor)Adds a KeyEventPostProcessor to this KeyboardFocusManager's post- processor chain.public void addKeyEventPostProcessor(KeyEventPostProcessor processor)- 
Description copied from class:KeyboardFocusManagerAdds a KeyEventPostProcessor to this KeyboardFocusManager's post- processor chain. After a KeyEvent has been dispatched to and handled by its target, KeyboardFocusManager will request that each KeyEventPostProcessor perform any necessary post-processing as part of the KeyEvent's final resolution. KeyEventPostProcessors will be notified in the order in which they were added; the current KeyboardFocusManager will be notified last. Notifications will halt as soon as one KeyEventPostProcessor returnstruefrom itspostProcessKeyEventmethod. There is no limit to the the total number of KeyEventPostProcessors that can be added, nor to the number of times that a particular KeyEventPostProcessor instance can be added.If a null post-processor is specified, no action is taken and no exception is thrown. In a multithreaded application, KeyEventPostProcessorbehaves the same as other AWT listeners. See AWT Threading Issues for more details.- Parameters:
- processor- the KeyEventPostProcessor to add to the post-processor chain
- See Also:
- KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor)
 
  addPropertyChangeListener   voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)Adds a PropertyChangeListener to the listener list.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)- 
Description copied from class:KeyboardFocusManagerAdds a PropertyChangeListener to the listener list. The listener is registered for all bound properties of this class, including the following:- whether the KeyboardFocusManager is currently managing focus for this application or applet's browser context ("managingFocus")
- the focus owner ("focusOwner")
- the permanent focus owner ("permanentFocusOwner")
- the focused Window ("focusedWindow")
- the active Window ("activeWindow")
- the default focus traversal policy ("defaultFocusTraversalPolicy")
- the Set of default FORWARD_TRAVERSAL_KEYS ("forwardDefaultFocusTraversalKeys")
- the Set of default BACKWARD_TRAVERSAL_KEYS ("backwardDefaultFocusTraversalKeys")
- the Set of default UP_CYCLE_TRAVERSAL_KEYS ("upCycleDefaultFocusTraversalKeys")
- the Set of default DOWN_CYCLE_TRAVERSAL_KEYS ("downCycleDefaultFocusTraversalKeys")
- the current focus cycle root ("currentFocusCycleRoot")
 - Parameters:
- listener- the PropertyChangeListener to be added
- See Also:
- KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener),- KeyboardFocusManager.getPropertyChangeListeners(),- KeyboardFocusManager.addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
 
  addPropertyChangeListener   voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Adds a PropertyChangeListener to the listener list for a specific property.public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)- 
Description copied from class:KeyboardFocusManagerAdds a PropertyChangeListener to the listener list for a specific property. The specified property may be user-defined, or one of the following:- whether the KeyboardFocusManager is currently managing focus for this application or applet's browser context ("managingFocus")
- the focus owner ("focusOwner")
- the permanent focus owner ("permanentFocusOwner")
- the focused Window ("focusedWindow")
- the active Window ("activeWindow")
- the default focus traversal policy ("defaultFocusTraversalPolicy")
- the Set of default FORWARD_TRAVERSAL_KEYS ("forwardDefaultFocusTraversalKeys")
- the Set of default BACKWARD_TRAVERSAL_KEYS ("backwardDefaultFocusTraversalKeys")
- the Set of default UP_CYCLE_TRAVERSAL_KEYS ("upCycleDefaultFocusTraversalKeys")
- the Set of default DOWN_CYCLE_TRAVERSAL_KEYS ("downCycleDefaultFocusTraversalKeys")
- the current focus cycle root ("currentFocusCycleRoot")
 - Parameters:
- propertyName- one of the property names listed above
- listener- the PropertyChangeListener to be added
- See Also:
- KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener),- KeyboardFocusManager.removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener),- KeyboardFocusManager.getPropertyChangeListeners(java.lang.String)
 
  addVetoableChangeListener   voidaddVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)Adds a VetoableChangeListener to the listener list for a specific property.public void addVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)- 
Description copied from class:KeyboardFocusManagerAdds a VetoableChangeListener to the listener list for a specific property. The specified property may be user-defined, or one of the following:- the focus owner ("focusOwner")
- the permanent focus owner ("permanentFocusOwner")
- the focused Window ("focusedWindow")
- the active Window ("activeWindow")
 - Parameters:
- propertyName- one of the property names listed above
- listener- the VetoableChangeListener to be added
- See Also:
- KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener),- KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener),- KeyboardFocusManager.getVetoableChangeListeners()
 
  addVetoableChangeListener   voidaddVetoableChangeListener(java.beans.VetoableChangeListener listener)Adds a VetoableChangeListener to the listener list.public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)- 
Description copied from class:KeyboardFocusManagerAdds a VetoableChangeListener to the listener list. The listener is registered for all vetoable properties of this class, including the following:- the focus owner ("focusOwner")
- the permanent focus owner ("permanentFocusOwner")
- the focused Window ("focusedWindow")
- the active Window ("activeWindow")
 - Parameters:
- listener- the VetoableChangeListener to be added
- See Also:
- KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener),- KeyboardFocusManager.getVetoableChangeListeners(),- KeyboardFocusManager.addVetoableChangeListener(java.lang.String,java.beans.VetoableChangeListener)
 
  clearGlobalFocusOwner   voidclearGlobalFocusOwner()Clears the global focus owner at both the Java and native levels.public void clearGlobalFocusOwner()- 
Description copied from class:KeyboardFocusManagerClears the global focus owner at both the Java and native levels. If there exists a focus owner, that Component will receive a permanent FOCUS_LOST event. After this operation completes, the native windowing system will discard all user-generated KeyEvents until the user selects a new Component to receive focus, or a Component is given focus explicitly via a call torequestFocus(). This operation does not change the focused or active Windows.
  dequeueKeyEvents   protected voiddequeueKeyEvents(long after, Component untilFocused)Releases for normal dispatching to the current focus owner all KeyEvents which were enqueued because of a call toenqueueKeyEventswith the same timestamp and Component.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 toenqueueKeyEventswith 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.- Specified by:
- dequeueKeyEventsin class- KeyboardFocusManager
- Parameters:
- after- the timestamp specified in the call to- enqueueKeyEvents, or any value < 0
- untilFocused- the Component specified in the call to- enqueueKeyEvents
- See Also:
- enqueueKeyEvents(long, java.awt.Component),- discardKeyEvents(java.awt.Component)
 
  discardKeyEvents   protected voiddiscardKeyEvents(Component comp)Discards all KeyEvents which were enqueued because of one or more calls toenqueueKeyEventswith the specified Component, or one of its descendants.protected void discardKeyEvents(Component comp)- 
Discards all KeyEvents which were enqueued because of one or more calls toenqueueKeyEventswith the specified Component, or one of its descendants.- Specified by:
- discardKeyEventsin class- KeyboardFocusManager
- Parameters:
- comp- the Component specified in one or more calls to- enqueueKeyEvents, or a parent of such a Component
- See Also:
- enqueueKeyEvents(long, java.awt.Component),- dequeueKeyEvents(long, java.awt.Component)
 
  dispatchEvent   booleandispatchEvent(AWTEvent e)This method is called by the AWT event dispatcher requesting that the current KeyboardFocusManager dispatch the specified event on its behalf.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. 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 returnsfalse, then the AWT event dispatcher will attempt to dispatch the event itself.- Specified by:
- dispatchEventin class- KeyboardFocusManager
- Parameters:
- e- the AWTEvent to be dispatched
- Returns:
- trueif this method dispatched the event;- falseotherwise
- See Also:
- KeyboardFocusManager.redispatchEvent(java.awt.Component, java.awt.AWTEvent),- KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent)
 
  dispatchKeyEvent   booleandispatchKeyEvent(KeyEvent e)Called bydispatchEventif no other KeyEventDispatcher in the dispatcher chain dispatched the KeyEvent, or if no other KeyEventDispatchers are registered.public boolean dispatchKeyEvent(KeyEvent e)- 
Called bydispatchEventif 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 neitherdispatchEvent, nor the AWT event dispatcher, should take further action on the event in any situation.- Specified by:
- dispatchKeyEventin interface- KeyEventDispatcher
- Specified by:
- dispatchKeyEventin class- KeyboardFocusManager
- Parameters:
- e- the KeyEvent to be dispatched
- Returns:
- true
- See Also:
- Component.dispatchEvent(java.awt.AWTEvent)
 
  downFocusCycle   voiddownFocusCycle()Moves the focus down one focus traversal cycle from the current focus owner, if and only if the current focus owner is a Container that is a focus cycle root.public final void downFocusCycle()- 
Description copied from class:KeyboardFocusManagerMoves the focus down one focus traversal cycle from the current focus owner, if and only if the current focus owner is a Container that is a focus cycle root. Typically, the focus owner is set to the current focus owner's default Component to focus, and the current focus cycle root is set to the current focus owner. If the current focus owner is not a Container that is a focus cycle root, then no focus traversal operation occurs.
  downFocusCycle   voiddownFocusCycle(Container aContainer)Moves the focus down one focus traversal cycle.public void downFocusCycle(Container aContainer)- 
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.- Specified by:
- downFocusCyclein class- KeyboardFocusManager
- Parameters:
- aContainer- the Container that is the basis for the focus traversal operation
- See Also:
- Container.transferFocusDownCycle()
 
  enqueueKeyEvents   protected voidenqueueKeyEvents(long after, Component untilFocused)Delays dispatching of KeyEvents until the specified Component becomes the focus owner.protected void enqueueKeyEvents(long after, Component untilFocused)- 
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 invokingdequeueKeyEventsordiscardKeyEvents.- Specified by:
- enqueueKeyEventsin class- KeyboardFocusManager
- Parameters:
- after- timestamp of current event, or the current, system time if the current event has no timestamp, or the AWT cannot determine which event is currently being handled
- untilFocused- Component which will receive a FOCUS_GAINED event before any pending KeyEvents
- See Also:
- dequeueKeyEvents(long, java.awt.Component),- discardKeyEvents(java.awt.Component)
 
  firePropertyChange   protected voidfirePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)Fires a PropertyChangeEvent in response to a change in a bound property.protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)- 
Description copied from class:KeyboardFocusManagerFires a PropertyChangeEvent in response to a change in a bound property. The event will be delivered to all registered PropertyChangeListeners. No event will be delivered if oldValue and newValue are the same.- Parameters:
- propertyName- the name of the property that has changed
- oldValue- the property's previous value
- newValue- the property's new value
 
  fireVetoableChange   protected voidfireVetoableChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)Fires a PropertyChangeEvent in response to a change in a vetoable property.protected void fireVetoableChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue) throws java.beans.PropertyVetoException- 
Description copied from class:KeyboardFocusManagerFires a PropertyChangeEvent in response to a change in a vetoable property. The event will be delivered to all registered VetoableChangeListeners. If a VetoableChangeListener throws a PropertyVetoException, a new event is fired reverting all VetoableChangeListeners to the old value and the exception is then rethrown. No event will be delivered if oldValue and newValue are the same.- Parameters:
- propertyName- the name of the property that has changed
- oldValue- the property's previous value
- newValue- the property's new value
- Throws:
- java.beans.PropertyVetoException- if a- VetoableChangeListenerthrew- PropertyVetoException
 
  focusNextComponent   voidfocusNextComponent()Focuses the Component after the current focus owner.public final void focusNextComponent()- 
Description copied from class:KeyboardFocusManagerFocuses the Component after the current focus owner.
  focusNextComponent   voidfocusNextComponent(Component aComponent)Focuses the Component after aComponent, typically based on a FocusTraversalPolicy.public void focusNextComponent(Component aComponent)- 
Focuses the Component after aComponent, typically based on a FocusTraversalPolicy.- Specified by:
- focusNextComponentin class- KeyboardFocusManager
- Parameters:
- aComponent- the Component that is the basis for the focus traversal operation
- See Also:
- FocusTraversalPolicy,- Component.transferFocus()
 
  focusPreviousComponent   voidfocusPreviousComponent()Focuses the Component before the current focus owner.public final void focusPreviousComponent()- 
Description copied from class:KeyboardFocusManagerFocuses the Component before the current focus owner.
  focusPreviousComponent   voidfocusPreviousComponent(Component aComponent)Focuses the Component before aComponent, typically based on a FocusTraversalPolicy.public void focusPreviousComponent(Component aComponent)- 
Focuses the Component before aComponent, typically based on a FocusTraversalPolicy.- Specified by:
- focusPreviousComponentin class- KeyboardFocusManager
- Parameters:
- aComponent- the Component that is the basis for the focus traversal operation
- See Also:
- FocusTraversalPolicy,- Component.transferFocusBackward()
 
  getActiveWindow   WindowgetActiveWindow()Returns the active Window, if the active Window is in the same context as the calling thread.public Window getActiveWindow()- 
Description copied from class:KeyboardFocusManagerReturns the active Window, if the active Window is in the same context as the calling thread. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.- Returns:
- the active Window, or null if the active Window is not a member of the calling thread's context
- See Also:
- KeyboardFocusManager.getGlobalActiveWindow(),- KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window)
 
  getCurrentFocusCycleRoot   ContainergetCurrentFocusCycleRoot()Returns the current focus cycle root, if the current focus cycle root is in the same context as the calling thread.public Container getCurrentFocusCycleRoot()- 
Description copied from class:KeyboardFocusManagerReturns the current focus cycle root, if the current focus cycle root is in the same context as the calling thread. If the focus owner is itself a focus cycle root, then it may be ambiguous as to which Components represent the next and previous Components to focus during normal focus traversal. In that case, the current focus cycle root is used to differentiate among the possibilities.This method is intended to be used only by KeyboardFocusManagers and focus implementations. It is not for general client use. - Returns:
- the current focus cycle root, or null if the current focus cycle root is not a member of the calling thread's context
- See Also:
- KeyboardFocusManager.getGlobalCurrentFocusCycleRoot(),- KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container)
 
  getDefaultFocusTraversalKeys   java.util.Set<AWTKeyStroke>getDefaultFocusTraversalKeys(int id)Returns a Set of default focus traversal keys for a given traversal operation.public java.util.Set<AWTKeyStroke> getDefaultFocusTraversalKeys(int id)- 
Description copied from class:KeyboardFocusManagerReturns a Set of default focus traversal keys for a given traversal operation. This traversal key Set will be in effect on all Windows that have no such Set of their own explicitly defined. This Set will also be inherited, recursively, by any child Component of those Windows that has no such Set of its own explicitly defined. (SeesetDefaultFocusTraversalKeysfor a full description of each operation.)- Parameters:
- id- one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
- Returns:
- the SetofAWTKeyStrokes for the specified operation; theSetwill be unmodifiable, and may be empty;nullwill never be returned
- Throws:
- java.lang.IllegalArgumentException- if id is not one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
- See Also:
- KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>),- Component.setFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>),- Component.getFocusTraversalKeys(int)
 
  getDefaultFocusTraversalPolicy   FocusTraversalPolicygetDefaultFocusTraversalPolicy()Returns the default FocusTraversalPolicy.public FocusTraversalPolicy getDefaultFocusTraversalPolicy()- 
Description copied from class:KeyboardFocusManagerReturns the default FocusTraversalPolicy. Top-level components use this value on their creation to initialize their own focus traversal policy by explicit call to Container.setFocusTraversalPolicy.- Returns:
- the default FocusTraversalPolicy. null will never be returned.
- See Also:
- KeyboardFocusManager.setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy),- Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy),- Container.getFocusTraversalPolicy()
 
  getFocusedWindow   WindowgetFocusedWindow()Returns the focused Window, if the focused Window is in the same context as the calling thread.public Window getFocusedWindow()- 
Description copied from class:KeyboardFocusManagerReturns the focused Window, if the focused Window is in the same context as the calling thread. The focused Window is the Window that is or contains the focus owner.- Returns:
- the focused Window, or null if the focused Window is not a member of the calling thread's context
- See Also:
- KeyboardFocusManager.getGlobalFocusedWindow(),- KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window)
 
  getFocusOwner   ComponentgetFocusOwner()Returns the focus owner, if the focus owner is in the same context as the calling thread.public Component getFocusOwner()- 
Description copied from class:KeyboardFocusManagerReturns the focus owner, if the focus owner is in the same context as the calling thread. The focus owner is defined as the Component in an application that will typically receive all KeyEvents generated by the user. KeyEvents which map to the focus owner's focus traversal keys will not be delivered if focus traversal keys are enabled for the focus owner. In addition, KeyEventDispatchers may retarget or consume KeyEvents before they reach the focus owner.- Returns:
- the focus owner, or null if the focus owner is not a member of the calling thread's context
- See Also:
- KeyboardFocusManager.getGlobalFocusOwner(),- KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component)
 
  getGlobalActiveWindow   protected WindowgetGlobalActiveWindow()Returns the active Window, even if the calling thread is in a different context than the active Window.protected Window getGlobalActiveWindow() throws java.lang.SecurityException- 
Description copied from class:KeyboardFocusManagerReturns the active Window, even if the calling thread is in a different context than the active Window. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.This method will throw a SecurityException if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context. - Returns:
- the active Window
- Throws:
- java.lang.SecurityException- if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
- See Also:
- KeyboardFocusManager.getActiveWindow(),- KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window)
 
  getGlobalCurrentFocusCycleRoot   protected ContainergetGlobalCurrentFocusCycleRoot()Returns the current focus cycle root, even if the calling thread is in a different context than the current focus cycle root.protected Container getGlobalCurrentFocusCycleRoot() throws java.lang.SecurityException- 
Description copied from class:KeyboardFocusManagerReturns the current focus cycle root, even if the calling thread is in a different context than the current focus cycle root. If the focus owner is itself a focus cycle root, then it may be ambiguous as to which Components represent the next and previous Components to focus during normal focus traversal. In that case, the current focus cycle root is used to differentiate among the possibilities.This method will throw a SecurityException if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context. - Returns:
- the current focus cycle root, or null if the current focus cycle root is not a member of the calling thread's context
- Throws:
- java.lang.SecurityException- if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
- See Also:
- KeyboardFocusManager.getCurrentFocusCycleRoot(),- KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container)
 
  getGlobalFocusedWindow   protected WindowgetGlobalFocusedWindow()Returns the focused Window, even if the calling thread is in a different context than the focused Window.protected Window getGlobalFocusedWindow() throws java.lang.SecurityException- 
Description copied from class:KeyboardFocusManagerReturns the focused Window, even if the calling thread is in a different context than the focused Window. The focused Window is the Window that is or contains the focus owner.This method will throw a SecurityException if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context. - Returns:
- the focused Window
- Throws:
- java.lang.SecurityException- if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
- See Also:
- KeyboardFocusManager.getFocusedWindow(),- KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window)
 
  getGlobalFocusOwner   protected ComponentgetGlobalFocusOwner()Returns the focus owner, even if the calling thread is in a different context than the focus owner.protected Component getGlobalFocusOwner() throws java.lang.SecurityException- 
Description copied from class:KeyboardFocusManagerReturns the focus owner, even if the calling thread is in a different context than the focus owner. The focus owner is defined as the Component in an application that will typically receive all KeyEvents generated by the user. KeyEvents which map to the focus owner's focus traversal keys will not be delivered if focus traversal keys are enabled for the focus owner. In addition, KeyEventDispatchers may retarget or consume KeyEvents before they reach the focus owner.This method will throw a SecurityException if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context. - Returns:
- the focus owner
- Throws:
- java.lang.SecurityException- if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
- See Also:
- KeyboardFocusManager.getFocusOwner(),- KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component)
 
  getGlobalPermanentFocusOwner   protected ComponentgetGlobalPermanentFocusOwner()Returns the permanent focus owner, even if the calling thread is in a different context than the permanent focus owner.protected Component getGlobalPermanentFocusOwner() throws java.lang.SecurityException- 
Description copied from class:KeyboardFocusManagerReturns the permanent focus owner, even if the calling thread is in a different context than the permanent focus owner. The permanent focus owner is defined as the last Component in an application to receive a permanent FOCUS_GAINED event. The focus owner and permanent focus owner are equivalent unless a temporary focus change is currently in effect. In such a situation, the permanent focus owner will again be the focus owner when the temporary focus change ends.This method will throw a SecurityException if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context. - Returns:
- the permanent focus owner
- Throws:
- java.lang.SecurityException- if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
- See Also:
- KeyboardFocusManager.getPermanentFocusOwner(),- KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component)
 
  getKeyEventDispatchers   protected java.util.List<KeyEventDispatcher>getKeyEventDispatchers()Returns this KeyboardFocusManager's KeyEventDispatcher chain as a List.protected java.util.List<KeyEventDispatcher> getKeyEventDispatchers()- 
Description copied from class:KeyboardFocusManagerReturns this KeyboardFocusManager's KeyEventDispatcher chain as a List. The List will not include this KeyboardFocusManager unless it was explicitly re-registered via a call toaddKeyEventDispatcher. If no other KeyEventDispatchers are registered, implementations are free to return null or a List of length 0. Client code should not assume one behavior over another, nor should it assume that the behavior, once established, will not change.- Returns:
- a possibly null or empty List of KeyEventDispatchers
- See Also:
- KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher),- KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher)
 
  getKeyEventPostProcessors   protected java.util.List<KeyEventPostProcessor>getKeyEventPostProcessors()Returns this KeyboardFocusManager's KeyEventPostProcessor chain as a List.protected java.util.List<KeyEventPostProcessor> getKeyEventPostProcessors()- 
Description copied from class:KeyboardFocusManagerReturns this KeyboardFocusManager's KeyEventPostProcessor chain as a List. The List will not include this KeyboardFocusManager unless it was explicitly added via a call toaddKeyEventPostProcessor. If no KeyEventPostProcessors are registered, implementations are free to return null or a List of length 0. Client code should not assume one behavior over another, nor should it assume that the behavior, once established, will not change.- Returns:
- a possibly null or empty List of KeyEventPostProcessors
- See Also:
- KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor),- KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor)
 
  getPermanentFocusOwner   ComponentgetPermanentFocusOwner()Returns the permanent focus owner, if the permanent focus owner is in the same context as the calling thread.public Component getPermanentFocusOwner()- 
Description copied from class:KeyboardFocusManagerReturns the permanent focus owner, if the permanent focus owner is in the same context as the calling thread. The permanent focus owner is defined as the last Component in an application to receive a permanent FOCUS_GAINED event. The focus owner and permanent focus owner are equivalent unless a temporary focus change is currently in effect. In such a situation, the permanent focus owner will again be the focus owner when the temporary focus change ends.- Returns:
- the permanent focus owner, or null if the permanent focus owner is not a member of the calling thread's context
- See Also:
- KeyboardFocusManager.getGlobalPermanentFocusOwner(),- KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component)
 
  getPropertyChangeListeners   java.beans.PropertyChangeListener[]getPropertyChangeListeners()Returns an array of all the property change listeners registered on this keyboard focus manager.public java.beans.PropertyChangeListener[] getPropertyChangeListeners()- 
Description copied from class:KeyboardFocusManagerReturns an array of all the property change listeners registered on this keyboard focus manager.- Returns:
- all of this keyboard focus manager's
         PropertyChangeListeners or an empty array if no property change listeners are currently registered
- Since:
- 1.4
- See Also:
- KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener),- KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener),- KeyboardFocusManager.getPropertyChangeListeners(java.lang.String)
 
  getPropertyChangeListeners   java.beans.PropertyChangeListener[]getPropertyChangeListeners(java.lang.String propertyName)Returns an array of all thePropertyChangeListeners associated with the named property.public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)- 
Description copied from class:KeyboardFocusManagerReturns an array of all thePropertyChangeListeners associated with the named property.- Returns:
- all of the PropertyChangeListeners associated with the named property or an empty array if no such listeners have been added.
- Since:
- 1.4
- See Also:
- KeyboardFocusManager.addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener),- KeyboardFocusManager.removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
 
  getVetoableChangeListeners   java.beans.VetoableChangeListener[]getVetoableChangeListeners()Returns an array of all the vetoable change listeners registered on this keyboard focus manager.public java.beans.VetoableChangeListener[] getVetoableChangeListeners()- 
Description copied from class:KeyboardFocusManagerReturns an array of all the vetoable change listeners registered on this keyboard focus manager.- Returns:
- all of this keyboard focus manager's
         VetoableChangeListeners or an empty array if no vetoable change listeners are currently registered
- Since:
- 1.4
- See Also:
- KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener),- KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener),- KeyboardFocusManager.getVetoableChangeListeners(java.lang.String)
 
  getVetoableChangeListeners   java.beans.VetoableChangeListener[]getVetoableChangeListeners(java.lang.String propertyName)Returns an array of all theVetoableChangeListeners associated with the named property.public java.beans.VetoableChangeListener[] getVetoableChangeListeners(java.lang.String propertyName)- 
Description copied from class:KeyboardFocusManagerReturns an array of all theVetoableChangeListeners associated with the named property.- Returns:
- all of the VetoableChangeListeners associated with the named property or an empty array if no such listeners have been added.
- Since:
- 1.4
- See Also:
- KeyboardFocusManager.addVetoableChangeListener(java.lang.String,java.beans.VetoableChangeListener),- KeyboardFocusManager.removeVetoableChangeListener(java.lang.String,java.beans.VetoableChangeListener),- KeyboardFocusManager.getVetoableChangeListeners()
 
  postProcessKeyEvent   booleanpostProcessKeyEvent(KeyEvent e)This method will be called bydispatchKeyEvent.public boolean postProcessKeyEvent(KeyEvent e)- 
This method will be called bydispatchKeyEvent. It will handle any unconsumed KeyEvents that map to an AWTMenuShortcutby consuming the event and activating the shortcut.- Specified by:
- postProcessKeyEventin interface- KeyEventPostProcessor
- Specified by:
- postProcessKeyEventin class- KeyboardFocusManager
- Parameters:
- e- the KeyEvent to post-process
- Returns:
- true
- See Also:
- dispatchKeyEvent(java.awt.event.KeyEvent),- MenuShortcut
 
  processKeyEvent   voidprocessKeyEvent(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.- 
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.- Specified by:
- processKeyEventin class- KeyboardFocusManager
- Parameters:
- focusedComponent- the Component that is the basis for a focus traversal operation if the specified event represents a focus traversal key for the Component
- e- the event that may represent a focus traversal key
 
  redispatchEvent   voidredispatchEvent(Component target, AWTEvent e)Redispatches an AWTEvent in such a way that the AWT event dispatcher will not recursively request that the KeyboardFocusManager, or any installed KeyEventDispatchers, dispatch the event again.- 
Description copied from class:KeyboardFocusManagerRedispatches an AWTEvent in such a way that the AWT event dispatcher will not recursively request that the KeyboardFocusManager, or any installed KeyEventDispatchers, dispatch the event again. Client implementations ofdispatchEventand client-defined KeyEventDispatchers must callredispatchEvent(target, e)instead oftarget.dispatchEvent(e)to dispatch an event.This method is intended to be used only by KeyboardFocusManagers and KeyEventDispatchers. It is not for general client use. - Parameters:
- target- the Component to which the event should be dispatched
- e- the event to dispatch
- See Also:
- KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent),- KeyEventDispatcher
 
  removeKeyEventDispatcher   voidremoveKeyEventDispatcher(KeyEventDispatcher dispatcher)Removes a KeyEventDispatcher which was previously added to this KeyboardFocusManager's dispatcher chain.public void removeKeyEventDispatcher(KeyEventDispatcher dispatcher)- 
Description copied from class:KeyboardFocusManagerRemoves a KeyEventDispatcher which was previously added to this KeyboardFocusManager's dispatcher chain. This KeyboardFocusManager cannot itself be removed, unless it was explicitly re-registered via a call toaddKeyEventDispatcher.If a null dispatcher is specified, if the specified dispatcher is not in the dispatcher chain, or if this KeyboardFocusManager is specified without having been explicitly re-registered, no action is taken and no exception is thrown. In a multithreaded application, KeyEventDispatcherbehaves the same as other AWT listeners. See AWT Threading Issues for more details.- Parameters:
- dispatcher- the KeyEventDispatcher to remove from the dispatcher chain
- See Also:
- KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher)
 
  removeKeyEventPostProcessor   voidremoveKeyEventPostProcessor(KeyEventPostProcessor processor)Removes a previously added KeyEventPostProcessor from this KeyboardFocusManager's post-processor chain.public void removeKeyEventPostProcessor(KeyEventPostProcessor processor)- 
Description copied from class:KeyboardFocusManagerRemoves a previously added KeyEventPostProcessor from this KeyboardFocusManager's post-processor chain. This KeyboardFocusManager cannot itself be entirely removed from the chain. Only additional references added viaaddKeyEventPostProcessorcan be removed.If a null post-processor is specified, if the specified post-processor is not in the post-processor chain, or if this KeyboardFocusManager is specified without having been explicitly added, no action is taken and no exception is thrown. In a multithreaded application, KeyEventPostProcessorbehaves the same as other AWT listeners. See AWT Threading Issues for more details.- Parameters:
- processor- the KeyEventPostProcessor to remove from the post- processor chain
- See Also:
- KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor)
 
  removePropertyChangeListener   voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)Removes a PropertyChangeListener from the listener list.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)- 
Description copied from class:KeyboardFocusManagerRemoves a PropertyChangeListener from the listener list. This method should be used to remove the PropertyChangeListeners that were registered for all bound properties of this class.If listener is null, no exception is thrown and no action is performed. - Parameters:
- listener- the PropertyChangeListener to be removed
- See Also:
- KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener),- KeyboardFocusManager.getPropertyChangeListeners(),- KeyboardFocusManager.removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
 
  removePropertyChangeListener   voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Removes a PropertyChangeListener from the listener list for a specific property.public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)- 
Description copied from class:KeyboardFocusManagerRemoves a PropertyChangeListener from the listener list for a specific property. This method should be used to remove PropertyChangeListeners that were registered for a specific bound property.If listener is null, no exception is thrown and no action is performed. - Parameters:
- propertyName- a valid property name
- listener- the PropertyChangeListener to be removed
- See Also:
- KeyboardFocusManager.addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener),- KeyboardFocusManager.getPropertyChangeListeners(java.lang.String),- KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener)
 
  removeVetoableChangeListener   voidremoveVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)Removes a VetoableChangeListener from the listener list for a specific property.public void removeVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)- 
Description copied from class:KeyboardFocusManagerRemoves a VetoableChangeListener from the listener list for a specific property. This method should be used to remove VetoableChangeListeners that were registered for a specific bound property.If listener is null, no exception is thrown and no action is performed. - Parameters:
- propertyName- a valid property name
- listener- the VetoableChangeListener to be removed
- See Also:
- KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener),- KeyboardFocusManager.getVetoableChangeListeners(),- KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener)
 
  removeVetoableChangeListener   voidremoveVetoableChangeListener(java.beans.VetoableChangeListener listener)Removes a VetoableChangeListener from the listener list.public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)- 
Description copied from class:KeyboardFocusManagerRemoves a VetoableChangeListener from the listener list. This method should be used to remove the VetoableChangeListeners that were registered for all vetoable properties of this class.If listener is null, no exception is thrown and no action is performed. - Parameters:
- listener- the VetoableChangeListener to be removed
- See Also:
- KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener),- KeyboardFocusManager.getVetoableChangeListeners(),- KeyboardFocusManager.removeVetoableChangeListener(java.lang.String,java.beans.VetoableChangeListener)
 
  setDefaultFocusTraversalKeys   voidsetDefaultFocusTraversalKeys(int id, java.util.Set<? extends AWTKeyStroke> keystrokes)Sets the default focus traversal keys for a given traversal operation.public void setDefaultFocusTraversalKeys(int id, java.util.Set<? extends AWTKeyStroke> keystrokes)- 
Description copied from class:KeyboardFocusManagerSets the default focus traversal keys for a given traversal operation. This traversal keySetwill be in effect on allWindows that have no suchSetof their own explicitly defined. ThisSetwill also be inherited, recursively, by any childComponentof thoseWindowsthat has no suchSetof its own explicitly defined.The default values for the default focus traversal keys are implementation-dependent. Sun recommends that all implementations for a particular native platform use the same default values. The recommendations for Windows and Unix are listed below. These recommendations are used in the Sun AWT implementations. 
 To disable a traversal key, use an emptyIdentifier Meaning Default KeyboardFocusManager.FORWARD_TRAVERSAL_KEYSNormal forward keyboard traversal TABonKEY_PRESSED,CTRL-TABonKEY_PRESSEDKeyboardFocusManager.BACKWARD_TRAVERSAL_KEYSNormal reverse keyboard traversal SHIFT-TABonKEY_PRESSED,CTRL-SHIFT-TABonKEY_PRESSEDKeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYSGo up one focus traversal cycle none KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYSGo down one focus traversal cycle none Set;Collections.EMPTY_SETis recommended.Using the AWTKeyStrokeAPI, client code can specify on which of two specificKeyEvents,KEY_PRESSEDorKEY_RELEASED, the focus traversal operation will occur. Regardless of whichKeyEventis specified, however, allKeyEvents related to the focus traversal key, including the associatedKEY_TYPEDevent, will be consumed, and will not be dispatched to anyComponent. It is a runtime error to specify aKEY_TYPEDevent as mapping to a focus traversal operation, or to map the same event to multiple default focus traversal operations.- Parameters:
- id- one of- KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,- KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,- KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or- KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
- keystrokes- the Set of- AWTKeyStrokes for the specified operation
- Throws:
- java.lang.IllegalArgumentException- if id is not one of- KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,- KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,- KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or- KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS, or if keystrokes is- null, or if keystrokes contains- null, or if any- Objectin keystrokes is not an- AWTKeyStroke, or if any keystroke represents a- KEY_TYPEDevent, or if any keystroke already maps to another default focus traversal operation
- See Also:
- KeyboardFocusManager.getDefaultFocusTraversalKeys(int),- Component.setFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>),- Component.getFocusTraversalKeys(int)
 
  setDefaultFocusTraversalPolicy   voidsetDefaultFocusTraversalPolicy(FocusTraversalPolicy defaultPolicy)Sets the default FocusTraversalPolicy.public void setDefaultFocusTraversalPolicy(FocusTraversalPolicy defaultPolicy)- 
Description copied from class:KeyboardFocusManagerSets the default FocusTraversalPolicy. Top-level components use this value on their creation to initialize their own focus traversal policy by explicit call to Container.setFocusTraversalPolicy. Note: this call doesn't affect already created components as they have their policy initialized. Only new components will use this policy as their default policy.- Parameters:
- defaultPolicy- the new, default FocusTraversalPolicy
- Throws:
- java.lang.IllegalArgumentException- if defaultPolicy is null
- See Also:
- KeyboardFocusManager.getDefaultFocusTraversalPolicy(),- Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy),- Container.getFocusTraversalPolicy()
 
  setGlobalActiveWindow   protected voidsetGlobalActiveWindow(Window activeWindow)Sets the active Window.protected void setGlobalActiveWindow(Window activeWindow)- 
Description copied from class:KeyboardFocusManagerSets the active Window. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.This method does not actually change the active Window as far as the native windowing system is concerned. It merely stores the value to be subsequently returned by getActiveWindow(). UseComponent.requestFocus()orComponent.requestFocusInWindow()to change the active Window, subject to platform limitations.- Parameters:
- activeWindow- the active Window
- See Also:
- KeyboardFocusManager.getActiveWindow(),- KeyboardFocusManager.getGlobalActiveWindow(),- Component.requestFocus(),- Component.requestFocusInWindow()
 
  setGlobalCurrentFocusCycleRoot   voidsetGlobalCurrentFocusCycleRoot(Container newFocusCycleRoot)Sets the current focus cycle root.public void setGlobalCurrentFocusCycleRoot(Container newFocusCycleRoot)- 
Description copied from class:KeyboardFocusManagerSets the current focus cycle root. If the focus owner is itself a focus cycle root, then it may be ambiguous as to which Components represent the next and previous Components to focus during normal focus traversal. In that case, the current focus cycle root is used to differentiate among the possibilities.This method is intended to be used only by KeyboardFocusManagers and focus implementations. It is not for general client use. - Parameters:
- newFocusCycleRoot- the new focus cycle root
- See Also:
- KeyboardFocusManager.getCurrentFocusCycleRoot(),- KeyboardFocusManager.getGlobalCurrentFocusCycleRoot()
 
  setGlobalFocusedWindow   protected voidsetGlobalFocusedWindow(Window focusedWindow)Sets the focused Window.protected void setGlobalFocusedWindow(Window focusedWindow)- 
Description copied from class:KeyboardFocusManagerSets the focused Window. The focused Window is the Window that is or contains the focus owner. The operation will be cancelled if the specified Window to focus is not a focusable Window.This method does not actually change the focused Window as far as the native windowing system is concerned. It merely stores the value to be subsequently returned by getFocusedWindow(). UseComponent.requestFocus()orComponent.requestFocusInWindow()to change the focused Window, subject to platform limitations.- Parameters:
- focusedWindow- the focused Window
- See Also:
- KeyboardFocusManager.getFocusedWindow(),- KeyboardFocusManager.getGlobalFocusedWindow(),- Component.requestFocus(),- Component.requestFocusInWindow(),- Window.isFocusableWindow()
 
  setGlobalFocusOwner   protected voidsetGlobalFocusOwner(Component focusOwner)Sets the focus owner.protected void setGlobalFocusOwner(Component focusOwner)- 
Description copied from class:KeyboardFocusManagerSets the focus owner. The operation will be cancelled if the Component is not focusable. The focus owner is defined as the Component in an application that will typically receive all KeyEvents generated by the user. KeyEvents which map to the focus owner's focus traversal keys will not be delivered if focus traversal keys are enabled for the focus owner. In addition, KeyEventDispatchers may retarget or consume KeyEvents before they reach the focus owner.This method does not actually set the focus to the specified Component. It merely stores the value to be subsequently returned by getFocusOwner(). UseComponent.requestFocus()orComponent.requestFocusInWindow()to change the focus owner, subject to platform limitations.- Parameters:
- focusOwner- the focus owner
- See Also:
- KeyboardFocusManager.getFocusOwner(),- KeyboardFocusManager.getGlobalFocusOwner(),- Component.requestFocus(),- Component.requestFocusInWindow(),- Component.isFocusable()
 
  setGlobalPermanentFocusOwner   protected voidsetGlobalPermanentFocusOwner(Component permanentFocusOwner)Sets the permanent focus owner.protected void setGlobalPermanentFocusOwner(Component permanentFocusOwner)- 
Description copied from class:KeyboardFocusManagerSets the permanent focus owner. The operation will be cancelled if the Component is not focusable. The permanent focus owner is defined as the last Component in an application to receive a permanent FOCUS_GAINED event. The focus owner and permanent focus owner are equivalent unless a temporary focus change is currently in effect. In such a situation, the permanent focus owner will again be the focus owner when the temporary focus change ends.This method does not actually set the focus to the specified Component. It merely stores the value to be subsequently returned by getPermanentFocusOwner(). UseComponent.requestFocus()orComponent.requestFocusInWindow()to change the focus owner, subject to platform limitations.- Parameters:
- permanentFocusOwner- the permanent focus owner
- See Also:
- KeyboardFocusManager.getPermanentFocusOwner(),- KeyboardFocusManager.getGlobalPermanentFocusOwner(),- Component.requestFocus(),- Component.requestFocusInWindow(),- Component.isFocusable()
 
  upFocusCycle   voidupFocusCycle()Moves the focus up one focus traversal cycle from the current focus owner.public final void upFocusCycle()- 
Description copied from class:KeyboardFocusManagerMoves the focus up one focus traversal cycle from the current focus owner. Typically, the new focus owner is set to the current focus owner's focus cycle root, and the current focus cycle root is set to the new focus owner's focus cycle root. If, however, the current focus owner's focus cycle root is a Window, then typically the focus owner is set to the focus cycle root's default Component to focus, and the current focus cycle root is unchanged.
  upFocusCycle   voidupFocusCycle(Component aComponent)Moves the focus up one focus traversal cycle.public void upFocusCycle(Component aComponent)- 
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.- Specified by:
- upFocusCyclein class- KeyboardFocusManager
- Parameters:
- aComponent- the Component that is the basis for the focus traversal operation
- See Also:
- Component.transferFocusUpCycle()
 
 
- 
 
