Package org.fest.swing.core
Class WindowAncestorFinder
java.lang.Object
org.fest.swing.core.WindowAncestorFinder
Understands lookup of a component's
ancestor
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Window
Similar to
, but returns theSwingUtilities.getWindowAncestor(Component)
itself if it is aComponent
, or the invoker'sWindow
Window
if on a pop-up.
-
Field Details
-
hierarchy
-
-
Constructor Details
-
WindowAncestorFinder
private WindowAncestorFinder()
-
-
Method Details
-
windowAncestorOf
Similar to
, but returns theSwingUtilities.getWindowAncestor(Component)
itself if it is aComponent
, or the invoker'sWindow
Window
if on a pop-up.Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
c
- theComponent
to get theWindow
ancestor of.- Returns:
- the
Window
ancestor of the givenComponent
, theComponent
itself if it is aWindow
, or the invoker'sWindow
if on a pop-up.
-