java.awt
Class KeyboardFocusManager

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.KeyboardFocusManager
All Implemented Interfaces:
KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher , KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor
Direct Known Subclasses:
DefaultKeyboardFocusManager sample code for java.awt.DefaultKeyboardFocusManager definition code for java.awt.DefaultKeyboardFocusManager

public abstract class KeyboardFocusManager
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher , KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor

The KeyboardFocusManager is responsible for managing the active and focused Windows, and the current focus owner. The focus owner is defined as the Component in an application that will typically receive all KeyEvents generated by the user. The focused Window is the Window that is, or contains, the focus owner. 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.

The KeyboardFocusManager is both a centralized location for client code to query for the focus owner and initiate focus changes, and an event dispatcher for all FocusEvents, WindowEvents related to focus, and KeyEvents.

Some browsers partition applets in different code bases into separate contexts, and establish walls between these contexts. In such a scenario, there will be one KeyboardFocusManager per context. Other browsers place all applets into the same context, implying that there will be only a single, global KeyboardFocusManager for all applets. This behavior is implementation-dependent. Consult your browser's documentation for more information. No matter how many contexts there may be, however, there can never be more than one focus owner, focused Window, or active Window, per ClassLoader.

Please see How to Use the Focus Subsystem, a section in The Java Tutorial, and the Focus Specification for more information.

Since:
1.4
See Also:
Window sample code for java.awt.Window definition code for java.awt.Window , Frame sample code for java.awt.Frame definition code for java.awt.Frame , Dialog sample code for java.awt.Dialog definition code for java.awt.Dialog , FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent , WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent , KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent

Field Summary
static int BACKWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS
          The identifier for the Backward focus traversal keys.
static int DOWN_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
          The identifier for the Down Cycle focus traversal keys.
static int FORWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS
          The identifier for the Forward focus traversal keys.
static int UP_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS
          The identifier for the Up Cycle focus traversal keys.
 
Constructor Summary
KeyboardFocusManager sample code for java.awt.KeyboardFocusManager.KeyboardFocusManager() definition code for java.awt.KeyboardFocusManager.KeyboardFocusManager() ()
          Initializes a KeyboardFocusManager.
 
Method Summary
 void addKeyEventDispatcher sample code for java.awt.KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher) definition code for java.awt.KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher) (KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher  dispatcher)
          Adds a KeyEventDispatcher to this KeyboardFocusManager's dispatcher chain.
 void addKeyEventPostProcessor sample code for java.awt.KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor) definition code for java.awt.KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor) (KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor  processor)
          Adds a KeyEventPostProcessor to this KeyboardFocusManager's post- processor chain.
 void addPropertyChangeListener sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) (PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) (String sample code for java.lang.String definition code for java.lang.String  propertyName, PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Adds a PropertyChangeListener to the listener list for a specific property.
 void addVetoableChangeListener sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) (String sample code for java.lang.String definition code for java.lang.String  propertyName, VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener  listener)
          Adds a VetoableChangeListener to the listener list for a specific property.
 void addVetoableChangeListener sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) (VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener  listener)
          Adds a VetoableChangeListener to the listener list.
 void clearGlobalFocusOwner sample code for java.awt.KeyboardFocusManager.clearGlobalFocusOwner() definition code for java.awt.KeyboardFocusManager.clearGlobalFocusOwner() ()
          Clears the global focus owner at both the Java and native levels.
protected abstract  void dequeueKeyEvents sample code for java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component) definition code for java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component) (long after, Component sample code for java.awt.Component definition code for java.awt.Component  untilFocused)
          Called by the AWT to notify the KeyboardFocusManager that it should cancel delayed dispatching of KeyEvents.
protected abstract  void discardKeyEvents sample code for java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component) definition code for java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  comp)
          Called by the AWT to notify the KeyboardFocusManager that it should cancel delayed dispatching of KeyEvents.
abstract  boolean dispatchEvent sample code for java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent) (AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent  e)
          This method is called by the AWT event dispatcher requesting that the current KeyboardFocusManager dispatch the specified event on its behalf.
abstract  boolean dispatchKeyEvent sample code for java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent) (KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e)
          Typically this method will be called by dispatchEvent if no other KeyEventDispatcher in the dispatcher chain dispatched the KeyEvent, or if no other KeyEventDispatchers are registered.
 void downFocusCycle sample code for java.awt.KeyboardFocusManager.downFocusCycle() definition code for java.awt.KeyboardFocusManager.downFocusCycle() ()
          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.
abstract  void downFocusCycle sample code for java.awt.KeyboardFocusManager.downFocusCycle(java.awt.Container) definition code for java.awt.KeyboardFocusManager.downFocusCycle(java.awt.Container) (Container sample code for java.awt.Container definition code for java.awt.Container  aContainer)
          Moves the focus down one focus traversal cycle.
protected abstract  void enqueueKeyEvents sample code for java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component) definition code for java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component) (long after, Component sample code for java.awt.Component definition code for java.awt.Component  untilFocused)
          Called by the AWT to notify the KeyboardFocusManager that it should delay dispatching of KeyEvents until the specified Component becomes the focus owner.
protected  void firePropertyChange sample code for java.awt.KeyboardFocusManager.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.KeyboardFocusManager.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  propertyName, Object sample code for java.lang.Object definition code for java.lang.Object  oldValue, Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
          Fires a PropertyChangeEvent in response to a change in a bound property.
protected  void fireVetoableChange sample code for java.awt.KeyboardFocusManager.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.KeyboardFocusManager.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  propertyName, Object sample code for java.lang.Object definition code for java.lang.Object  oldValue, Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
          Fires a PropertyChangeEvent in response to a change in a vetoable property.
 void focusNextComponent sample code for java.awt.KeyboardFocusManager.focusNextComponent() definition code for java.awt.KeyboardFocusManager.focusNextComponent() ()
          Focuses the Component after the current focus owner.
abstract  void focusNextComponent sample code for java.awt.KeyboardFocusManager.focusNextComponent(java.awt.Component) definition code for java.awt.KeyboardFocusManager.focusNextComponent(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  aComponent)
          Focuses the Component after aComponent, typically based on a FocusTraversalPolicy.
 void focusPreviousComponent sample code for java.awt.KeyboardFocusManager.focusPreviousComponent() definition code for java.awt.KeyboardFocusManager.focusPreviousComponent() ()
          Focuses the Component before the current focus owner.
abstract  void focusPreviousComponent sample code for java.awt.KeyboardFocusManager.focusPreviousComponent(java.awt.Component) definition code for java.awt.KeyboardFocusManager.focusPreviousComponent(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  aComponent)
          Focuses the Component before aComponent, typically based on a FocusTraversalPolicy.
 Window sample code for java.awt.Window definition code for java.awt.Window getActiveWindow sample code for java.awt.KeyboardFocusManager.getActiveWindow() definition code for java.awt.KeyboardFocusManager.getActiveWindow() ()
          Returns the active Window, if the active Window is in the same context as the calling thread.
 Container sample code for java.awt.Container definition code for java.awt.Container getCurrentFocusCycleRoot sample code for java.awt.KeyboardFocusManager.getCurrentFocusCycleRoot() definition code for java.awt.KeyboardFocusManager.getCurrentFocusCycleRoot() ()
          Returns the current focus cycle root, if the current focus cycle root is in the same context as the calling thread.
static KeyboardFocusManager sample code for java.awt.KeyboardFocusManager definition code for java.awt.KeyboardFocusManager getCurrentKeyboardFocusManager sample code for java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager() definition code for java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager() ()
          Returns the current KeyboardFocusManager instance for the calling thread's context.
 Set sample code for java.util.Set definition code for java.util.Set <AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > getDefaultFocusTraversalKeys sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) (int id)
          Returns a Set of default focus traversal keys for a given traversal operation.
 FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy getDefaultFocusTraversalPolicy sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalPolicy() definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalPolicy() ()
          Returns the default FocusTraversalPolicy.
 Window sample code for java.awt.Window definition code for java.awt.Window getFocusedWindow sample code for java.awt.KeyboardFocusManager.getFocusedWindow() definition code for java.awt.KeyboardFocusManager.getFocusedWindow() ()
          Returns the focused Window, if the focused Window is in the same context as the calling thread.
 Component sample code for java.awt.Component definition code for java.awt.Component getFocusOwner sample code for java.awt.KeyboardFocusManager.getFocusOwner() definition code for java.awt.KeyboardFocusManager.getFocusOwner() ()
          Returns the focus owner, if the focus owner is in the same context as the calling thread.
protected  Window sample code for java.awt.Window definition code for java.awt.Window getGlobalActiveWindow sample code for java.awt.KeyboardFocusManager.getGlobalActiveWindow() definition code for java.awt.KeyboardFocusManager.getGlobalActiveWindow() ()
          Returns the active Window, even if the calling thread is in a different context than the active Window.
protected  Container sample code for java.awt.Container definition code for java.awt.Container getGlobalCurrentFocusCycleRoot sample code for java.awt.KeyboardFocusManager.getGlobalCurrentFocusCycleRoot() definition code for java.awt.KeyboardFocusManager.getGlobalCurrentFocusCycleRoot() ()
          Returns the current focus cycle root, even if the calling thread is in a different context than the current focus cycle root.
protected  Window sample code for java.awt.Window definition code for java.awt.Window getGlobalFocusedWindow sample code for java.awt.KeyboardFocusManager.getGlobalFocusedWindow() definition code for java.awt.KeyboardFocusManager.getGlobalFocusedWindow() ()
          Returns the focused Window, even if the calling thread is in a different context than the focused Window.
protected  Component sample code for java.awt.Component definition code for java.awt.Component getGlobalFocusOwner sample code for java.awt.KeyboardFocusManager.getGlobalFocusOwner() definition code for java.awt.KeyboardFocusManager.getGlobalFocusOwner() ()
          Returns the focus owner, even if the calling thread is in a different context than the focus owner.
protected  Component sample code for java.awt.Component definition code for java.awt.Component getGlobalPermanentFocusOwner sample code for java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner() definition code for java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner() ()
          Returns the permanent focus owner, even if the calling thread is in a different context than the permanent focus owner.
protected  List sample code for java.util.List definition code for java.util.List <KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher > getKeyEventDispatchers sample code for java.awt.KeyboardFocusManager.getKeyEventDispatchers() definition code for java.awt.KeyboardFocusManager.getKeyEventDispatchers() ()
          Returns this KeyboardFocusManager's KeyEventDispatcher chain as a List.
protected  List sample code for java.util.List definition code for java.util.List <KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor > getKeyEventPostProcessors sample code for java.awt.KeyboardFocusManager.getKeyEventPostProcessors() definition code for java.awt.KeyboardFocusManager.getKeyEventPostProcessors() ()
          Returns this KeyboardFocusManager's KeyEventPostProcessor chain as a List.
 Component sample code for java.awt.Component definition code for java.awt.Component getPermanentFocusOwner sample code for java.awt.KeyboardFocusManager.getPermanentFocusOwner() definition code for java.awt.KeyboardFocusManager.getPermanentFocusOwner() ()
          Returns the permanent focus owner, if the permanent focus owner is in the same context as the calling thread.
 PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners() definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners() ()
          Returns an array of all the property change listeners registered on this keyboard focus manager.
 PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String) definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  propertyName)
          Returns an array of all the PropertyChangeListeners associated with the named property.
 VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener [] getVetoableChangeListeners sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() ()
          Returns an array of all the vetoable change listeners registered on this keyboard focus manager.
 VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener [] getVetoableChangeListeners sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners(java.lang.String) definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  propertyName)
          Returns an array of all the VetoableChangeListeners associated with the named property.
abstract  boolean postProcessKeyEvent sample code for java.awt.KeyboardFocusManager.postProcessKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.KeyboardFocusManager.postProcessKeyEvent(java.awt.event.KeyEvent) (KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e)
          This method will be called by dispatchKeyEvent.
abstract  void processKeyEvent sample code for java.awt.KeyboardFocusManager.processKeyEvent(java.awt.Component, java.awt.event.KeyEvent) definition code for java.awt.KeyboardFocusManager.processKeyEvent(java.awt.Component, java.awt.event.KeyEvent) (Component sample code for java.awt.Component definition code for java.awt.Component  focusedComponent, KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.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 redispatchEvent sample code for java.awt.KeyboardFocusManager.redispatchEvent(java.awt.Component, java.awt.AWTEvent) definition code for java.awt.KeyboardFocusManager.redispatchEvent(java.awt.Component, java.awt.AWTEvent) (Component sample code for java.awt.Component definition code for java.awt.Component  target, AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.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.
 void removeKeyEventDispatcher sample code for java.awt.KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher) definition code for java.awt.KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher) (KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher  dispatcher)
          Removes a KeyEventDispatcher which was previously added to this KeyboardFocusManager's dispatcher chain.
 void removeKeyEventPostProcessor sample code for java.awt.KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor) definition code for java.awt.KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor) (KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor  processor)
          Removes a previously added KeyEventPostProcessor from this KeyboardFocusManager's post-processor chain.
 void removePropertyChangeListener sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener) (PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Removes a PropertyChangeListener from the listener list.
 void removePropertyChangeListener sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) (String sample code for java.lang.String definition code for java.lang.String  propertyName, PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Removes a PropertyChangeListener from the listener list for a specific property.
 void removeVetoableChangeListener sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) (String sample code for java.lang.String definition code for java.lang.String  propertyName, VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener  listener)
          Removes a VetoableChangeListener from the listener list for a specific property.
 void removeVetoableChangeListener sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) (VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener  listener)
          Removes a VetoableChangeListener from the listener list.
static void setCurrentKeyboardFocusManager sample code for java.awt.KeyboardFocusManager.setCurrentKeyboardFocusManager(java.awt.KeyboardFocusManager) definition code for java.awt.KeyboardFocusManager.setCurrentKeyboardFocusManager(java.awt.KeyboardFocusManager) (KeyboardFocusManager sample code for java.awt.KeyboardFocusManager definition code for java.awt.KeyboardFocusManager  newManager)
          Sets the current KeyboardFocusManager instance for the calling thread's context.
 void setDefaultFocusTraversalKeys sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) (int id, Set sample code for java.util.Set definition code for java.util.Set <? extends AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > keystrokes)
          Sets the default focus traversal keys for a given traversal operation.
 void setDefaultFocusTraversalPolicy sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy) (FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy  defaultPolicy)
          Sets the default FocusTraversalPolicy.
protected  void setGlobalActiveWindow sample code for java.awt.KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window) definition code for java.awt.KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window) (Window sample code for java.awt.Window definition code for java.awt.Window  activeWindow)
          Sets the active Window.
 void setGlobalCurrentFocusCycleRoot sample code for java.awt.KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container) definition code for java.awt.KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container) (Container sample code for java.awt.Container definition code for java.awt.Container  newFocusCycleRoot)
          Sets the current focus cycle root.
protected  void setGlobalFocusedWindow sample code for java.awt.KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window) definition code for java.awt.KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window) (Window sample code for java.awt.Window definition code for java.awt.Window  focusedWindow)
          Sets the focused Window.
protected  void setGlobalFocusOwner sample code for java.awt.KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component) definition code for java.awt.KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  focusOwner)
          Sets the focus owner.
protected  void setGlobalPermanentFocusOwner sample code for java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component) definition code for java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  permanentFocusOwner)
          Sets the permanent focus owner.
 void upFocusCycle sample code for java.awt.KeyboardFocusManager.upFocusCycle() definition code for java.awt.KeyboardFocusManager.upFocusCycle() ()
          Moves the focus up one focus traversal cycle from the current focus owner.
abstract  void upFocusCycle sample code for java.awt.KeyboardFocusManager.upFocusCycle(java.awt.Component) definition code for java.awt.KeyboardFocusManager.upFocusCycle(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  aComponent)
          Moves the focus up one focus traversal cycle.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

FORWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS

public static final int FORWARD_TRAVERSAL_KEYS
The identifier for the Forward focus traversal keys.

See Also:
setDefaultFocusTraversalKeys(int, java.util.Set) sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) , getDefaultFocusTraversalKeys(int) sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) , Component.setFocusTraversalKeys(int, java.util.Set) sample code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) , Component.getFocusTraversalKeys(int) sample code for java.awt.Component.getFocusTraversalKeys(int) definition code for java.awt.Component.getFocusTraversalKeys(int) , Constant Field Values

BACKWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS

public static final int BACKWARD_TRAVERSAL_KEYS
The identifier for the Backward focus traversal keys.

See Also:
setDefaultFocusTraversalKeys(int, java.util.Set) sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) , getDefaultFocusTraversalKeys(int) sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) , Component.setFocusTraversalKeys(int, java.util.Set) sample code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) , Component.getFocusTraversalKeys(int) sample code for java.awt.Component.getFocusTraversalKeys(int) definition code for java.awt.Component.getFocusTraversalKeys(int) , Constant Field Values

UP_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS

public static final int UP_CYCLE_TRAVERSAL_KEYS
The identifier for the Up Cycle focus traversal keys.

See Also:
setDefaultFocusTraversalKeys(int, java.util.Set) sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) , getDefaultFocusTraversalKeys(int) sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) , Component.setFocusTraversalKeys(int, java.util.Set) sample code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) , Component.getFocusTraversalKeys(int) sample code for java.awt.Component.getFocusTraversalKeys(int) definition code for java.awt.Component.getFocusTraversalKeys(int) , Constant Field Values

DOWN_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS

public static final int DOWN_CYCLE_TRAVERSAL_KEYS
The identifier for the Down Cycle focus traversal keys.

See Also:
setDefaultFocusTraversalKeys(int, java.util.Set) sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) , getDefaultFocusTraversalKeys(int) sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) , Component.setFocusTraversalKeys(int, java.util.Set) sample code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) , Component.getFocusTraversalKeys(int) sample code for java.awt.Component.getFocusTraversalKeys(int) definition code for java.awt.Component.getFocusTraversalKeys(int) , Constant Field Values
Constructor Detail

KeyboardFocusManager sample code for java.awt.KeyboardFocusManager() definition code for java.awt.KeyboardFocusManager()

public KeyboardFocusManager()
Initializes a KeyboardFocusManager.

Method Detail

getCurrentKeyboardFocusManager sample code for java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager() definition code for java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager()

public static KeyboardFocusManager sample code for java.awt.KeyboardFocusManager definition code for java.awt.KeyboardFocusManager  getCurrentKeyboardFocusManager()
Returns the current KeyboardFocusManager instance for the calling thread's context.

Returns:
this thread's context's KeyboardFocusManager
See Also:
setCurrentKeyboardFocusManager(java.awt.KeyboardFocusManager) sample code for java.awt.KeyboardFocusManager.setCurrentKeyboardFocusManager(java.awt.KeyboardFocusManager) definition code for java.awt.KeyboardFocusManager.setCurrentKeyboardFocusManager(java.awt.KeyboardFocusManager)

setCurrentKeyboardFocusManager sample code for java.awt.KeyboardFocusManager.setCurrentKeyboardFocusManager(java.awt.KeyboardFocusManager) definition code for java.awt.KeyboardFocusManager.setCurrentKeyboardFocusManager(java.awt.KeyboardFocusManager)

public static void setCurrentKeyboardFocusManager(KeyboardFocusManager sample code for java.awt.KeyboardFocusManager definition code for java.awt.KeyboardFocusManager  newManager)
                                           throws SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException 
Sets 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:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if the calling thread does not have permission to replace the current KeyboardFocusManager
See Also:
getCurrentKeyboardFocusManager() sample code for java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager() definition code for java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager() , DefaultKeyboardFocusManager sample code for java.awt.DefaultKeyboardFocusManager definition code for java.awt.DefaultKeyboardFocusManager

getFocusOwner sample code for java.awt.KeyboardFocusManager.getFocusOwner() definition code for java.awt.KeyboardFocusManager.getFocusOwner()

public Component sample code for java.awt.Component definition code for java.awt.Component  getFocusOwner()
Returns 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:
getGlobalFocusOwner() sample code for java.awt.KeyboardFocusManager.getGlobalFocusOwner() definition code for java.awt.KeyboardFocusManager.getGlobalFocusOwner() , setGlobalFocusOwner(java.awt.Component) sample code for java.awt.KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component) definition code for java.awt.KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component)

getGlobalFocusOwner sample code for java.awt.KeyboardFocusManager.getGlobalFocusOwner() definition code for java.awt.KeyboardFocusManager.getGlobalFocusOwner()

protected Component sample code for java.awt.Component definition code for java.awt.Component  getGlobalFocusOwner()
                                 throws SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException 
Returns 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:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
See Also:
getFocusOwner() sample code for java.awt.KeyboardFocusManager.getFocusOwner() definition code for java.awt.KeyboardFocusManager.getFocusOwner() , setGlobalFocusOwner(java.awt.Component) sample code for java.awt.KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component) definition code for java.awt.KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component)

setGlobalFocusOwner sample code for java.awt.KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component) definition code for java.awt.KeyboardFocusManager.setGlobalFocusOwner(java.awt.Component)

protected void setGlobalFocusOwner(Component sample code for java.awt.Component definition code for java.awt.Component  focusOwner)
Sets 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(). Use Component.requestFocus() or Component.requestFocusInWindow() to change the focus owner, subject to platform limitations.

Parameters:
focusOwner - the focus owner
See Also:
getFocusOwner() sample code for java.awt.KeyboardFocusManager.getFocusOwner() definition code for java.awt.KeyboardFocusManager.getFocusOwner() , getGlobalFocusOwner() sample code for java.awt.KeyboardFocusManager.getGlobalFocusOwner() definition code for java.awt.KeyboardFocusManager.getGlobalFocusOwner() , Component.requestFocus() sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , Component.requestFocusInWindow() sample code for java.awt.Component.requestFocusInWindow() definition code for java.awt.Component.requestFocusInWindow() , Component.isFocusable() sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable()

clearGlobalFocusOwner sample code for java.awt.KeyboardFocusManager.clearGlobalFocusOwner() definition code for java.awt.KeyboardFocusManager.clearGlobalFocusOwner()

public void clearGlobalFocusOwner()
Clears 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 to requestFocus(). This operation does not change the focused or active Windows.

See Also:
Component.requestFocus() sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , FocusEvent.FOCUS_LOST sample code for java.awt.event.FocusEvent.FOCUS_LOST definition code for java.awt.event.FocusEvent.FOCUS_LOST

getPermanentFocusOwner sample code for java.awt.KeyboardFocusManager.getPermanentFocusOwner() definition code for java.awt.KeyboardFocusManager.getPermanentFocusOwner()

public Component sample code for java.awt.Component definition code for java.awt.Component  getPermanentFocusOwner()
Returns 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:
getGlobalPermanentFocusOwner() sample code for java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner() definition code for java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner() , setGlobalPermanentFocusOwner(java.awt.Component) sample code for java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component) definition code for java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component)

getGlobalPermanentFocusOwner sample code for java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner() definition code for java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner()

protected Component sample code for java.awt.Component definition code for java.awt.Component  getGlobalPermanentFocusOwner()
                                          throws SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException 
Returns 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:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
See Also:
getPermanentFocusOwner() sample code for java.awt.KeyboardFocusManager.getPermanentFocusOwner() definition code for java.awt.KeyboardFocusManager.getPermanentFocusOwner() , setGlobalPermanentFocusOwner(java.awt.Component) sample code for java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component) definition code for java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component)

setGlobalPermanentFocusOwner sample code for java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component) definition code for java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(java.awt.Component)

protected void setGlobalPermanentFocusOwner(Component sample code for java.awt.Component definition code for java.awt.Component  permanentFocusOwner)
Sets 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(). Use Component.requestFocus() or Component.requestFocusInWindow() to change the focus owner, subject to platform limitations.

Parameters:
permanentFocusOwner - the permanent focus owner
See Also:
getPermanentFocusOwner() sample code for java.awt.KeyboardFocusManager.getPermanentFocusOwner() definition code for java.awt.KeyboardFocusManager.getPermanentFocusOwner() , getGlobalPermanentFocusOwner() sample code for java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner() definition code for java.awt.KeyboardFocusManager.getGlobalPermanentFocusOwner() , Component.requestFocus() sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , Component.requestFocusInWindow() sample code for java.awt.Component.requestFocusInWindow() definition code for java.awt.Component.requestFocusInWindow() , Component.isFocusable() sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable()

getFocusedWindow sample code for java.awt.KeyboardFocusManager.getFocusedWindow() definition code for java.awt.KeyboardFocusManager.getFocusedWindow()

public Window sample code for java.awt.Window definition code for java.awt.Window  getFocusedWindow()
Returns 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:
getGlobalFocusedWindow() sample code for java.awt.KeyboardFocusManager.getGlobalFocusedWindow() definition code for java.awt.KeyboardFocusManager.getGlobalFocusedWindow() , setGlobalFocusedWindow(java.awt.Window) sample code for java.awt.KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window) definition code for java.awt.KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window)

getGlobalFocusedWindow sample code for java.awt.KeyboardFocusManager.getGlobalFocusedWindow() definition code for java.awt.KeyboardFocusManager.getGlobalFocusedWindow()

protected Window sample code for java.awt.Window definition code for java.awt.Window  getGlobalFocusedWindow()
                                 throws SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException 
Returns 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:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
See Also:
getFocusedWindow() sample code for java.awt.KeyboardFocusManager.getFocusedWindow() definition code for java.awt.KeyboardFocusManager.getFocusedWindow() , setGlobalFocusedWindow(java.awt.Window) sample code for java.awt.KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window) definition code for java.awt.KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window)

setGlobalFocusedWindow sample code for java.awt.KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window) definition code for java.awt.KeyboardFocusManager.setGlobalFocusedWindow(java.awt.Window)

protected void setGlobalFocusedWindow(Window sample code for java.awt.Window definition code for java.awt.Window  focusedWindow)
Sets 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(). Use Component.requestFocus() or Component.requestFocusInWindow() to change the focused Window, subject to platform limitations.

Parameters:
focusedWindow - the focused Window
See Also:
getFocusedWindow() sample code for java.awt.KeyboardFocusManager.getFocusedWindow() definition code for java.awt.KeyboardFocusManager.getFocusedWindow() , getGlobalFocusedWindow() sample code for java.awt.KeyboardFocusManager.getGlobalFocusedWindow() definition code for java.awt.KeyboardFocusManager.getGlobalFocusedWindow() , Component.requestFocus() sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , Component.requestFocusInWindow() sample code for java.awt.Component.requestFocusInWindow() definition code for java.awt.Component.requestFocusInWindow() , Window.isFocusableWindow() sample code for java.awt.Window.isFocusableWindow() definition code for java.awt.Window.isFocusableWindow()

getActiveWindow sample code for java.awt.KeyboardFocusManager.getActiveWindow() definition code for java.awt.KeyboardFocusManager.getActiveWindow()

public Window sample code for java.awt.Window definition code for java.awt.Window  getActiveWindow()
Returns 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:
getGlobalActiveWindow() sample code for java.awt.KeyboardFocusManager.getGlobalActiveWindow() definition code for java.awt.KeyboardFocusManager.getGlobalActiveWindow() , setGlobalActiveWindow(java.awt.Window) sample code for java.awt.KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window) definition code for java.awt.KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window)

getGlobalActiveWindow sample code for java.awt.KeyboardFocusManager.getGlobalActiveWindow() definition code for java.awt.KeyboardFocusManager.getGlobalActiveWindow()

protected Window sample code for java.awt.Window definition code for java.awt.Window  getGlobalActiveWindow()
                                throws SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException 
Returns 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:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
See Also:
getActiveWindow() sample code for java.awt.KeyboardFocusManager.getActiveWindow() definition code for java.awt.KeyboardFocusManager.getActiveWindow() , setGlobalActiveWindow(java.awt.Window) sample code for java.awt.KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window) definition code for java.awt.KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window)

setGlobalActiveWindow sample code for java.awt.KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window) definition code for java.awt.KeyboardFocusManager.setGlobalActiveWindow(java.awt.Window)

protected void setGlobalActiveWindow(Window sample code for java.awt.Window definition code for java.awt.Window  activeWindow)
Sets 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(). Use Component.requestFocus() or Component.requestFocusInWindow()to change the active Window, subject to platform limitations.

Parameters:
activeWindow - the active Window
See Also:
getActiveWindow() sample code for java.awt.KeyboardFocusManager.getActiveWindow() definition code for java.awt.KeyboardFocusManager.getActiveWindow() , getGlobalActiveWindow() sample code for java.awt.KeyboardFocusManager.getGlobalActiveWindow() definition code for java.awt.KeyboardFocusManager.getGlobalActiveWindow() , Component.requestFocus() sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , Component.requestFocusInWindow() sample code for java.awt.Component.requestFocusInWindow() definition code for java.awt.Component.requestFocusInWindow()

getDefaultFocusTraversalPolicy sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalPolicy() definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalPolicy()

public FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy  getDefaultFocusTraversalPolicy()
Returns 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:
setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , Container.getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy()

setDefaultFocusTraversalPolicy sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy)

public void setDefaultFocusTraversalPolicy(FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy  defaultPolicy)
Sets 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:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if defaultPolicy is null
See Also:
getDefaultFocusTraversalPolicy() sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalPolicy() definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalPolicy() , Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , Container.getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy()

setDefaultFocusTraversalKeys sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>)

public void setDefaultFocusTraversalKeys(int id,
                                         Set sample code for java.util.Set definition code for java.util.Set <? extends AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > keystrokes)
Sets the 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.

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.

Identifier Meaning Default
KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS Normal forward keyboard traversal TAB on KEY_PRESSED, CTRL-TAB on KEY_PRESSED
KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS Normal reverse keyboard traversal SHIFT-TAB on KEY_PRESSED, CTRL-SHIFT-TAB on KEY_PRESSED
KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS Go up one focus traversal cycle none
KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS Go down one focus traversal cycle none
To disable a traversal key, use an empty Set; Collections.EMPTY_SET is recommended.

Using the AWTKeyStroke API, client code can specify on which of two specific KeyEvents, KEY_PRESSED or KEY_RELEASED, the focus traversal operation will occur. Regardless of which KeyEvent is specified, however, all KeyEvents related to the focus traversal key, including the associated KEY_TYPED event, will be consumed, and will not be dispatched to any Component. It is a runtime error to specify a KEY_TYPED event 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:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for 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 Object in keystrokes is not an AWTKeyStroke, or if any keystroke represents a KEY_TYPED event, or if any keystroke already maps to another default focus traversal operation
See Also:
getDefaultFocusTraversalKeys(int) sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) , Component.setFocusTraversalKeys(int, java.util.Set) sample code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) , Component.getFocusTraversalKeys(int) sample code for java.awt.Component.getFocusTraversalKeys(int) definition code for java.awt.Component.getFocusTraversalKeys(int)

getDefaultFocusTraversalKeys sample code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int) definition code for java.awt.KeyboardFocusManager.getDefaultFocusTraversalKeys(int)

public Set sample code for java.util.Set definition code for java.util.Set <AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > getDefaultFocusTraversalKeys(int id)
Returns 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. (See setDefaultFocusTraversalKeys for 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 Set of AWTKeyStrokes for the specified operation; the Set will be unmodifiable, and may be empty; null will never be returned
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for 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:
setDefaultFocusTraversalKeys(int, java.util.Set) sample code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) definition code for java.awt.KeyboardFocusManager.setDefaultFocusTraversalKeys(int, java.util.Set) , Component.setFocusTraversalKeys(int, java.util.Set) sample code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) , Component.getFocusTraversalKeys(int) sample code for java.awt.Component.getFocusTraversalKeys(int) definition code for java.awt.Component.getFocusTraversalKeys(int)

getCurrentFocusCycleRoot sample code for java.awt.KeyboardFocusManager.getCurrentFocusCycleRoot() definition code for java.awt.KeyboardFocusManager.getCurrentFocusCycleRoot()

public Container sample code for java.awt.Container definition code for java.awt.Container  getCurrentFocusCycleRoot()
Returns 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:
getGlobalCurrentFocusCycleRoot() sample code for java.awt.KeyboardFocusManager.getGlobalCurrentFocusCycleRoot() definition code for java.awt.KeyboardFocusManager.getGlobalCurrentFocusCycleRoot() , setGlobalCurrentFocusCycleRoot(java.awt.Container) sample code for java.awt.KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container) definition code for java.awt.KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container)

getGlobalCurrentFocusCycleRoot sample code for java.awt.KeyboardFocusManager.getGlobalCurrentFocusCycleRoot() definition code for java.awt.KeyboardFocusManager.getGlobalCurrentFocusCycleRoot()

protected Container sample code for java.awt.Container definition code for java.awt.Container  getGlobalCurrentFocusCycleRoot()
                                            throws SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException 
Returns 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:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if this KeyboardFocusManager is not the current KeyboardFocusManager for the calling thread's context
See Also:
getCurrentFocusCycleRoot() sample code for java.awt.KeyboardFocusManager.getCurrentFocusCycleRoot() definition code for java.awt.KeyboardFocusManager.getCurrentFocusCycleRoot() , setGlobalCurrentFocusCycleRoot(java.awt.Container) sample code for java.awt.KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container) definition code for java.awt.KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container)

setGlobalCurrentFocusCycleRoot sample code for java.awt.KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container) definition code for java.awt.KeyboardFocusManager.setGlobalCurrentFocusCycleRoot(java.awt.Container)

public void setGlobalCurrentFocusCycleRoot(Container sample code for java.awt.Container definition code for java.awt.Container  newFocusCycleRoot)
Sets 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:
getCurrentFocusCycleRoot() sample code for java.awt.KeyboardFocusManager.getCurrentFocusCycleRoot() definition code for java.awt.KeyboardFocusManager.getCurrentFocusCycleRoot() , getGlobalCurrentFocusCycleRoot() sample code for java.awt.KeyboardFocusManager.getGlobalCurrentFocusCycleRoot() definition code for java.awt.KeyboardFocusManager.getGlobalCurrentFocusCycleRoot()

addPropertyChangeListener sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener)

public void addPropertyChangeListener(PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all bound properties of this class, including the following: If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener) , getPropertyChangeListeners() sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners() definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners() , addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

removePropertyChangeListener sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener)

public void removePropertyChangeListener(PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Removes 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:
addPropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) , getPropertyChangeListeners() sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners() definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners() , removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

getPropertyChangeListeners sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners() definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners()

public PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners()
Returns 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:
addPropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) , removePropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener) , getPropertyChangeListeners(java.lang.String) sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String) definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String)

addPropertyChangeListener sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

public void addPropertyChangeListener(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                      PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Adds a PropertyChangeListener to the listener list for a specific property. The specified property may be user-defined, or one of the following: If listener is null, no exception is thrown and no action is performed.

Parameters:
propertyName - one of the property names listed above
listener - the PropertyChangeListener to be added
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.beans.PropertyChangeListener) , removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , getPropertyChangeListeners(java.lang.String) sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String) definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String)

removePropertyChangeListener sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

public void removePropertyChangeListener(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                         PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Removes 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:
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , getPropertyChangeListeners(java.lang.String) sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String) definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String) , removePropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.beans.PropertyChangeListener)

getPropertyChangeListeners sample code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String) definition code for java.awt.KeyboardFocusManager.getPropertyChangeListeners(java.lang.String)

public PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners(String sample code for java.lang.String definition code for java.lang.String  propertyName)
Returns an array of all the PropertyChangeListeners 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:
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) sample code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.KeyboardFocusManager.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

firePropertyChange sample code for java.awt.KeyboardFocusManager.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.KeyboardFocusManager.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

protected void firePropertyChange(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                  Object sample code for java.lang.Object definition code for java.lang.Object  oldValue,
                                  Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
Fires 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

addVetoableChangeListener sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener)

public void addVetoableChangeListener(VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener  listener)
Adds a VetoableChangeListener to the listener list. The listener is registered for all vetoable properties of this class, including the following: If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the VetoableChangeListener to be added
See Also:
removeVetoableChangeListener(java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) , getVetoableChangeListeners() sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() , addVetoableChangeListener(java.lang.String,java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)

removeVetoableChangeListener sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener)

public void removeVetoableChangeListener(VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener  listener)
Removes 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:
addVetoableChangeListener(java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) , getVetoableChangeListeners() sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() , removeVetoableChangeListener(java.lang.String,java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)

getVetoableChangeListeners sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners()

public VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener [] getVetoableChangeListeners()
Returns 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:
addVetoableChangeListener(java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) , removeVetoableChangeListener(java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) , getVetoableChangeListeners(java.lang.String) sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners(java.lang.String) definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners(java.lang.String)

addVetoableChangeListener sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)

public void addVetoableChangeListener(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                      VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener  listener)
Adds a VetoableChangeListener to the listener list for a specific property. The specified property may be user-defined, or one of the following: If listener is null, no exception is thrown and no action is performed.

Parameters:
propertyName - one of the property names listed above
listener - the VetoableChangeListener to be added
See Also:
addVetoableChangeListener(java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) , removeVetoableChangeListener(java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) , getVetoableChangeListeners() sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners()

removeVetoableChangeListener sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener)

public void removeVetoableChangeListener(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                         VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener  listener)
Removes 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:
addVetoableChangeListener(java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.beans.VetoableChangeListener) , getVetoableChangeListeners() sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() , removeVetoableChangeListener(java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.beans.VetoableChangeListener)

getVetoableChangeListeners sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners(java.lang.String) definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners(java.lang.String)

public VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener [] getVetoableChangeListeners(String sample code for java.lang.String definition code for java.lang.String  propertyName)
Returns an array of all the VetoableChangeListeners 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:
addVetoableChangeListener(java.lang.String,java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) , removeVetoableChangeListener(java.lang.String,java.beans.VetoableChangeListener) sample code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.awt.KeyboardFocusManager.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) , getVetoableChangeListeners() sample code for java.awt.KeyboardFocusManager.getVetoableChangeListeners() definition code for java.awt.KeyboardFocusManager.getVetoableChangeListeners()

fireVetoableChange sample code for java.awt.KeyboardFocusManager.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.KeyboardFocusManager.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)

protected void fireVetoableChange(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                  Object sample code for java.lang.Object definition code for java.lang.Object  oldValue,
                                  Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
                           throws PropertyVetoException sample code for java.beans.PropertyVetoException definition code for java.beans.PropertyVetoException 
Fires 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:
PropertyVetoException sample code for java.beans.PropertyVetoException definition code for java.beans.PropertyVetoException - if a VetoableChangeListener threw PropertyVetoException

addKeyEventDispatcher sample code for java.awt.KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher) definition code for java.awt.KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher)

public void addKeyEventDispatcher(KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher  dispatcher)
Adds 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 returns true from its dispatchKeyEvent method. 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.

Parameters:
dispatcher - the KeyEventDispatcher to add to the dispatcher chain
See Also:
removeKeyEventDispatcher(java.awt.KeyEventDispatcher) sample code for java.awt.KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher) definition code for java.awt.KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher)

removeKeyEventDispatcher sample code for java.awt.KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher) definition code for java.awt.KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher)

public void removeKeyEventDispatcher(KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher  dispatcher)
Removes 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 to addKeyEventDispatcher.

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.

Parameters:
dispatcher - the KeyEventDispatcher to remove from the dispatcher chain
See Also:
addKeyEventDispatcher(java.awt.KeyEventDispatcher) sample code for java.awt.KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher) definition code for java.awt.KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher)

getKeyEventDispatchers sample code for java.awt.KeyboardFocusManager.getKeyEventDispatchers() definition code for java.awt.KeyboardFocusManager.getKeyEventDispatchers()

protected List sample code for java.util.List definition code for java.util.List <KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher > getKeyEventDispatchers()
Returns this KeyboardFocusManager's KeyEventDispatcher chain as a List. The List will not include this KeyboardFocusManager unless it was explicitly re-registered via a call to addKeyEventDispatcher. 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:
addKeyEventDispatcher(java.awt.KeyEventDispatcher) sample code for java.awt.KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher) definition code for java.awt.KeyboardFocusManager.addKeyEventDispatcher(java.awt.KeyEventDispatcher) , removeKeyEventDispatcher(java.awt.KeyEventDispatcher) sample code for java.awt.KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher) definition code for java.awt.KeyboardFocusManager.removeKeyEventDispatcher(java.awt.KeyEventDispatcher)

addKeyEventPostProcessor sample code for java.awt.KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor) definition code for java.awt.KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor)

public void addKeyEventPostProcessor(KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor  processor)
Adds 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 returns true from its postProcessKeyEvent method. 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.

Parameters:
processor - the KeyEventPostProcessor to add to the post-processor chain
See Also:
removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor) sample code for java.awt.KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor) definition code for java.awt.KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor)

removeKeyEventPostProcessor sample code for java.awt.KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor) definition code for java.awt.KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor)

public void removeKeyEventPostProcessor(KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor  processor)
Removes 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 via addKeyEventPostProcessor can 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.

Parameters:
processor - the KeyEventPostProcessor to remove from the post- processor chain
See Also:
addKeyEventPostProcessor(java.awt.KeyEventPostProcessor) sample code for java.awt.KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor) definition code for java.awt.KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor)

getKeyEventPostProcessors sample code for java.awt.KeyboardFocusManager.getKeyEventPostProcessors() definition code for java.awt.KeyboardFocusManager.getKeyEventPostProcessors()

protected List sample code for java.util.List definition code for java.util.List <KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor > getKeyEventPostProcessors()
Returns this KeyboardFocusManager's KeyEventPostProcessor chain as a List. The List will not include this KeyboardFocusManager unless it was explicitly added via a call to addKeyEventPostProcessor. 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:
addKeyEventPostProcessor(java.awt.KeyEventPostProcessor) sample code for java.awt.KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor) definition code for java.awt.KeyboardFocusManager.addKeyEventPostProcessor(java.awt.KeyEventPostProcessor) , removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor) sample code for java.awt.KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor) definition code for java.awt.KeyboardFocusManager.removeKeyEventPostProcessor(java.awt.KeyEventPostProcessor)

dispatchEvent sample code for java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent)

public abstract boolean dispatchEvent(AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent  e)
This method is called by the AWT event dispatcher requesting that the current KeyboardFocusManager dispatch the specified event on its behalf. It is expected that all KeyboardFocusManagers will dispatch all FocusEvents, all WindowEvents related to focus, and all KeyEvents. These events should be 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. Dispatching must be done using redispatchEvent to prevent the AWT event dispatcher from recursively requesting that the KeyboardFocusManager dispatch the event again. If this method returns false, then the AWT event dispatcher will attempt to dispatch the event itself.

Parameters:
e - the AWTEvent to be dispatched
Returns:
true if this method dispatched the event; false otherwise
See Also:
redispatchEvent(java.awt.Component, java.awt.AWTEvent) sample code for java.awt.KeyboardFocusManager.redispatchEvent(java.awt.Component, java.awt.AWTEvent) definition code for java.awt.KeyboardFocusManager.redispatchEvent(java.awt.Component, java.awt.AWTEvent) , dispatchKeyEvent(java.awt.event.KeyEvent) sample code for java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent)

redispatchEvent sample code for java.awt.KeyboardFocusManager.redispatchEvent(java.awt.Component, java.awt.AWTEvent) definition code for java.awt.KeyboardFocusManager.redispatchEvent(java.awt.Component, java.awt.AWTEvent)

public final void redispatchEvent(Component sample code for java.awt.Component definition code for java.awt.Component  target,
                                  AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.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. Client implementations of dispatchEvent and client-defined KeyEventDispatchers must call redispatchEvent(target, e) instead of target.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:
dispatchEvent(java.awt.AWTEvent) sample code for java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent) , KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher

dispatchKeyEvent sample code for java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent)

public abstract boolean dispatchKeyEvent(KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e)
Typically this method will be called by dispatchEvent if no other KeyEventDispatcher in the dispatcher chain dispatched the KeyEvent, or if no other KeyEventDispatchers are registered. If an implementation of this method returns false, dispatchEvent may try to dispatch the KeyEvent itself, or may simply return false. If true is returned, dispatchEvent should return true as well.

Specified by:
dispatchKeyEvent sample code for java.awt.KeyEventDispatcher.dispatchKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.KeyEventDispatcher.dispatchKeyEvent(java.awt.event.KeyEvent) in interface KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher
Parameters:
e - the KeyEvent which the current KeyboardFocusManager has requested that this KeyEventDispatcher dispatch
Returns:
true if the KeyEvent was dispatched; false otherwise
See Also:
dispatchEvent(java.awt.AWTEvent) sample code for java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.KeyboardFocusManager.dispatchEvent(java.awt.AWTEvent)

postProcessKeyEvent sample code for java.awt.KeyboardFocusManager.postProcessKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.KeyboardFocusManager.postProcessKeyEvent(java.awt.event.KeyEvent)

public abstract boolean postProcessKeyEvent(KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e)
This method will be called by dispatchKeyEvent. By default, this method will handle any unconsumed KeyEvents that map to an AWT MenuShortcut by consuming the event and activating the shortcut.

Specified by:
postProcessKeyEvent sample code for java.awt.KeyEventPostProcessor.postProcessKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.KeyEventPostProcessor.postProcessKeyEvent(java.awt.event.KeyEvent) in interface KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor
Parameters:
e - the KeyEvent to post-process
Returns:
true to indicate that no other KeyEventPostProcessor will be notified of the KeyEvent.
See Also:
dispatchKeyEvent(java.awt.event.KeyEvent) sample code for java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.KeyboardFocusManager.dispatchKeyEvent(java.awt.event.KeyEvent) , MenuShortcut sample code for java.awt.MenuShortcut definition code for java.awt.MenuShortcut

processKeyEvent sample code for java.awt.KeyboardFocusManager.processKeyEvent(java.awt.Component, java.awt.event.KeyEvent) definition code for java.awt.KeyboardFocusManager.processKeyEvent(java.awt.Component, java.awt.event.KeyEvent)

public abstract void processKeyEvent(Component sample code for java.awt.Component definition code for java.awt.Component  focusedComponent,
                                     KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e)
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 current focus owner.

Parameters:
focusedComponent - the Component that will be 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

enqueueKeyEvents sample code for java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component) definition code for java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component)

protected abstract void enqueueKeyEvents(long after,
                                         Component sample code for java.awt.Component definition code for java.awt.Component  untilFocused)
Called by the AWT to notify the KeyboardFocusManager that it should delay dispatching of KeyEvents until the specified Component becomes the focus owner. If client code requests a focus change, and the AWT determines that this request might be granted by the native windowing system, then the AWT will call this method. It is the responsibility of the KeyboardFocusManager to delay dispatching of KeyEvents with timestamps later than the specified time stamp 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 if the current event has no timestamp, or the AWT cannot determine which event is currently being handled
untilFocused - Component which should receive a FOCUS_GAINED event before any pending KeyEvents
See Also:
dequeueKeyEvents(long, java.awt.Component) sample code for java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component) definition code for java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component) , discardKeyEvents(java.awt.Component) sample code for java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component) definition code for java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component)

dequeueKeyEvents sample code for java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component) definition code for java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component)

protected abstract void dequeueKeyEvents(long after,
                                         Component sample code for java.awt.Component definition code for java.awt.Component  untilFocused)
Called by the AWT to notify the KeyboardFocusManager that it should cancel delayed dispatching of KeyEvents. All KeyEvents which were enqueued because of a call to enqueueKeyEvents with the same timestamp and Component should be released for normal dispatching to the current focus owner. 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 to enqueueKeyEvents, or any value < 0
untilFocused - the Component specified in the call to enqueueKeyEvents
See Also:
enqueueKeyEvents(long, java.awt.Component) sample code for java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component) definition code for java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component) , discardKeyEvents(java.awt.Component) sample code for java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component) definition code for java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component)

discardKeyEvents sample code for java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component) definition code for java.awt.KeyboardFocusManager.discardKeyEvents(java.awt.Component)

protected abstract void discardKeyEvents(Component sample code for java.awt.Component definition code for java.awt.Component  comp)
Called by the AWT to notify the KeyboardFocusManager that it should cancel delayed dispatching of KeyEvents. All KeyEvents which were enqueued because of one or more calls to enqueueKeyEvents with the same Component should be discarded.

Parameters:
comp - the Component specified in one or more calls to enqueueKeyEvents
See Also:
enqueueKeyEvents(long, java.awt.Component) sample code for java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component) definition code for java.awt.KeyboardFocusManager.enqueueKeyEvents(long, java.awt.Component) , dequeueKeyEvents(long, java.awt.Component) sample code for java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component) definition code for java.awt.KeyboardFocusManager.dequeueKeyEvents(long, java.awt.Component)

focusNextComponent sample code for java.awt.KeyboardFocusManager.focusNextComponent(java.awt.Component) definition code for java.awt.KeyboardFocusManager.focusNextComponent(java.awt.Component)

public abstract void focusNextComponent(Component sample code for java.awt.Component definition code for java.awt.Component  aComponent)
Focuses the Component after aComponent, typically based on a FocusTraversalPolicy.

Parameters:
aComponent - the Component that is the basis for the focus traversal operation
See Also:
FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy

focusPreviousComponent sample code for java.awt.KeyboardFocusManager.focusPreviousComponent(java.awt.Component) definition code for java.awt.KeyboardFocusManager.focusPreviousComponent(java.awt.Component)

public abstract void focusPreviousComponent(Component sample code for java.awt.Component definition code for java.awt.Component  aComponent)
Focuses the Component before aComponent, typically based on a FocusTraversalPolicy.

Parameters:
aComponent - the Component that is the basis for the focus traversal operation
See Also:
FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy

upFocusCycle sample code for java.awt.KeyboardFocusManager.upFocusCycle(java.awt.Component) definition code for java.awt.KeyboardFocusManager.upFocusCycle(java.awt.Component)

public abstract void upFocusCycle(Component sample code for java.awt.Component definition code for java.awt.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 typically the focus owner is set to the Window's default Component to focus, and the current focus cycle root is unchanged.

Parameters:
aComponent - the Component that is the basis for the focus traversal operation

downFocusCycle sample code for java.awt.KeyboardFocusManager.downFocusCycle(java.awt.Container) definition code for java.awt.KeyboardFocusManager.downFocusCycle(java.awt.Container)

public abstract void downFocusCycle(Container sample code for java.awt.Container definition code for java.awt.Container  aContainer)
Moves the focus down one focus traversal cycle. Typically, 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 focus traversal operation

focusNextComponent sample code for java.awt.KeyboardFocusManager.focusNextComponent() definition code for java.awt.KeyboardFocusManager.focusNextComponent()

public final void focusNextComponent()
Focuses the Component after the current focus owner.


focusPreviousComponent sample code for java.awt.KeyboardFocusManager.focusPreviousComponent() definition code for java.awt.KeyboardFocusManager.focusPreviousComponent()

public final void focusPreviousComponent()
Focuses the Component before the current focus owner.


upFocusCycle sample code for java.awt.KeyboardFocusManager.upFocusCycle() definition code for java.awt.KeyboardFocusManager.upFocusCycle()

public final void upFocusCycle()
Moves 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.


downFocusCycle sample code for java.awt.KeyboardFocusManager.downFocusCycle() definition code for java.awt.KeyboardFocusManager.downFocusCycle()

public final void downFocusCycle()
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. 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.