Class FocusOwnerFinder

java.lang.Object
org.fest.swing.core.FocusOwnerFinder

public final class FocusOwnerFinder extends Object
Understands lookup of a Component owning the input focus.
  • Field Details

  • Constructor Details

    • FocusOwnerFinder

      private FocusOwnerFinder()
  • Method Details

    • initializeStrategies

      static void initializeStrategies()
    • replaceStrategiesWith

      static void replaceStrategiesWith(FocusOwnerFinderStrategy... strategies)
    • strategies

      static List<FocusOwnerFinderStrategy> strategies()
    • inEdtFocusOwner

      @RunsInEDT public static Component inEdtFocusOwner()
      Returns the focus owner. This method is executed in the event dispatch thread.
      Returns:
      the focus owner.
    • focusOwner

      @RunsInCurrentThread public static Component focusOwner()
      Returns the focus owner. Note: this method is not executed in the event dispatch thread. Callers are responsible for calling this method in the event dispatch thread.

      Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.

      Returns:
      the focus owner.