java.awt

Class KeyboardFocusManager

  • java.lang.Object
    • java.awt.KeyboardFocusManager
  • All Implemented Interfaces:
    KeyEventDispatcher, KeyEventPostProcessor
    Direct Known Subclasses:
    DefaultKeyboardFocusManager
    public abstract class KeyboardFocusManager extends java.lang.Object implements KeyEventDispatcher, 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, Frame, Dialog, FocusEvent, WindowEvent, KeyEvent
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator getCurrentKeyboardFocusManager Reveal DetailHide Detail
      Returns the current KeyboardFocusManager instance for the calling thread's context.
      Ordinary member indicator setCurrentKeyboardFocusManager Reveal DetailHide Detail
      Sets the current KeyboardFocusManager instance for the calling thread's context.
    • Constructors 
      Constructor and Description
      Ordinary member indicator KeyboardFocusManager Reveal DetailHide Detail
      Initializes a KeyboardFocusManager.
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator addKeyEventDispatcher Reveal DetailHide Detail
      Adds a KeyEventDispatcher to this KeyboardFocusManager's dispatcher chain.
      Ordinary member indicator addKeyEventPostProcessor Reveal DetailHide Detail
      Adds a KeyEventPostProcessor to this KeyboardFocusManager's post- processor chain.
      Ordinary member indicator addPropertyChangeListener Reveal DetailHide Detail
      Adds a PropertyChangeListener to the listener list.
      Ordinary member indicator addPropertyChangeListener Reveal DetailHide Detail
      Adds a PropertyChangeListener to the listener list for a specific property.
      Ordinary member indicator addVetoableChangeListener Reveal DetailHide Detail
      Adds a VetoableChangeListener to the listener list for a specific property.
      Ordinary member indicator addVetoableChangeListener Reveal DetailHide Detail
      Adds a VetoableChangeListener to the listener list.
      Ordinary member indicator clearGlobalFocusOwner Reveal DetailHide Detail
      Clears the global focus owner at both the Java and native levels.
      Ordinary member indicator dispatchEvent Reveal DetailHide Detail
      This method is called by the AWT event dispatcher requesting that the current KeyboardFocusManager dispatch the specified event on its behalf.
      Ordinary member indicator dispatchKeyEvent Reveal DetailHide Detail
      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.
      Ordinary member indicator downFocusCycle Reveal DetailHide Detail
      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.
      Ordinary member indicator downFocusCycle Reveal DetailHide Detail
      Moves the focus down one focus traversal cycle.
      Ordinary member indicator focusNextComponent Reveal DetailHide Detail
      Focuses the Component after the current focus owner.
      Ordinary member indicator focusNextComponent Reveal DetailHide Detail
      Focuses the Component after aComponent, typically based on a FocusTraversalPolicy.
      Ordinary member indicator focusPreviousComponent Reveal DetailHide Detail
      Focuses the Component before the current focus owner.
      Ordinary member indicator focusPreviousComponent Reveal DetailHide Detail
      Focuses the Component before aComponent, typically based on a FocusTraversalPolicy.
      Ordinary member indicator getActiveWindow Reveal DetailHide Detail
      Returns the active Window, if the active Window is in the same context as the calling thread.
      Ordinary member indicator getCurrentFocusCycleRoot Reveal DetailHide Detail
      Returns the current focus cycle root, if the current focus cycle root is in the same context as the calling thread.
      Ordinary member indicator getDefaultFocusTraversalKeys Reveal DetailHide Detail
      Returns a Set of default focus traversal keys for a given traversal operation.
      Ordinary member indicator getDefaultFocusTraversalPolicy Reveal DetailHide Detail
      Returns the default FocusTraversalPolicy.
      Ordinary member indicator getFocusedWindow Reveal DetailHide Detail
      Returns the focused Window, if the focused Window is in the same context as the calling thread.
      Ordinary member indicator getFocusOwner Reveal DetailHide Detail
      Returns the focus owner, if the focus owner is in the same context as the calling thread.
      Ordinary member indicator getPermanentFocusOwner Reveal DetailHide Detail
      Returns the permanent focus owner, if the permanent focus owner is in the same context as the calling thread.
      Ordinary member indicator getPropertyChangeListeners Reveal DetailHide Detail
      Returns an array of all the property change listeners registered on this keyboard focus manager.
      Ordinary member indicator getPropertyChangeListeners Reveal DetailHide Detail
      Returns an array of all the PropertyChangeListeners associated with the named property.
      Ordinary member indicator getVetoableChangeListeners Reveal DetailHide Detail
      Returns an array of all the vetoable change listeners registered on this keyboard focus manager.
      Ordinary member indicator getVetoableChangeListeners Reveal DetailHide Detail
      Returns an array of all the VetoableChangeListeners associated with the named property.
      Ordinary member indicator postProcessKeyEvent Reveal DetailHide Detail
      This method will be called by dispatchKeyEvent.
      Ordinary member indicator processKeyEvent Reveal DetailHide Detail
      This method initiates a focus traversal operation if and only if the KeyEvent represents a focus traversal key for the specified focusedComponent.
      Ordinary member indicator redispatchEvent Reveal DetailHide Detail
      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.
      Ordinary member indicator removeKeyEventDispatcher Reveal DetailHide Detail
      Removes a KeyEventDispatcher which was previously added to this KeyboardFocusManager's dispatcher chain.
      Ordinary member indicator removeKeyEventPostProcessor Reveal DetailHide Detail
      Removes a previously added KeyEventPostProcessor from this KeyboardFocusManager's post-processor chain.
      Ordinary member indicator removePropertyChangeListener Reveal DetailHide Detail
      Removes a PropertyChangeListener from the listener list.
      Ordinary member indicator removePropertyChangeListener Reveal DetailHide Detail
      Removes a PropertyChangeListener from the listener list for a specific property.
      Ordinary member indicator removeVetoableChangeListener Reveal DetailHide Detail
      Removes a VetoableChangeListener from the listener list for a specific property.
      Ordinary member indicator removeVetoableChangeListener Reveal DetailHide Detail
      Removes a VetoableChangeListener from the listener list.
      Ordinary member indicator setDefaultFocusTraversalKeys Reveal DetailHide Detail
      Sets the default focus traversal keys for a given traversal operation.
      Ordinary member indicator setDefaultFocusTraversalPolicy Reveal DetailHide Detail
      Sets the default FocusTraversalPolicy.
      Ordinary member indicator setGlobalCurrentFocusCycleRoot Reveal DetailHide Detail
      Sets the current focus cycle root.
      Ordinary member indicator upFocusCycle Reveal DetailHide Detail
      Moves the focus up one focus traversal cycle from the current focus owner.
      Ordinary member indicator upFocusCycle Reveal DetailHide Detail
      Moves the focus up one focus traversal cycle.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge