Class FocusManager

All Implemented Interfaces:
Serializable

public class FocusManager extends KeyboardFocusManager
Emulator for FocusManager: four statics and one constant, exactly as the JDK class is. Every query and command migrated code calls — getFocusOwner, focusNextComponent, … — is inherited from KeyboardFocusManager, which documents them.

Concrete, where the JDK's is abstract (a deliberate R_swing_is_truth deviation): getCurrentManager() has to hand out an instance, and the JDK's concrete subclass DefaultFocusManager is not ported.

See Also:
  • Field Details

  • Constructor Details

    • FocusManager

      protected FocusManager()
  • Method Details

    • getCurrentManager

      public static FocusManager getCurrentManager()
      The shared stateless facade; never null.
    • setCurrentManager

      public static void setCurrentManager(FocusManager manager)
      WARN and ignore, same call as KeyboardFocusManager.setCurrentKeyboardFocusManager(KeyboardFocusManager): a user subclass's only overridable hooks are the ones this hierarchy WARNs on, so honouring the swap would imply more works than does.
    • disableSwingFocusManager

      @Deprecated public static void disableSwingFocusManager()
      Deprecated.
      Deprecated since 1.4 in the JDK and a no-op there for decades; there was never a Swing focus manager here to disable.
    • isFocusManagerEnabled

      @Deprecated public static boolean isFocusManagerEnabled()
      Deprecated.
      Always true — matching the JDK, where the flag has been pinned true since 1.4. Code gating on it takes the branch it takes on a modern JVM.