public final class WindowAncestorFinder extends Object
Component's Window ancestor.| Modifier and Type | Method and Description |
|---|---|
static Window |
windowAncestorOf(Component c)
Similar to
javax.swing.SwingUtilities#getWindowAncestor(Component), but returns the AWT or Swing
Component itself if it is a Window, or the invoker's Window if on a pop-up. |
@RunsInCurrentThread @Nullable public static Window windowAncestorOf(@Nonnull Component c)
Similar to javax.swing.SwingUtilities#getWindowAncestor(Component), but returns the AWT or Swing
Component itself if it is a Window, or the invoker's Window if on a pop-up.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT.) Client code must call this method from the EDT.
c - the Component to get the Window ancestor of.Window ancestor of the given Component, the Component itself if it is a
Window, or the invoker's Window if on a pop-up.Copyright © 2014 AssertJ. All rights reserved.