org.fest.swing.core
Class FocusOwnerFinder

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

public final class FocusOwnerFinder
extends Object

Understands lookup of a Component owning the input focus.

Author:
Yvonne Wang, Alex Ruiz

Method Summary
static Component focusOwner()
          Returns the focus owner.
static Component inEdtFocusOwner()
          Returns the focus owner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Returns:
the focus owner.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.