- java.lang.Object
-
- org.testfx.service.finder.impl.WindowFinderImpl
-
- All Implemented Interfaces:
WindowFinder
public class WindowFinderImpl extends Object implements WindowFinder
-
-
Constructor Summary
Constructors Constructor Description WindowFinderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Window>listTargetWindows()Returns a list of windows that are ordered by proximity to the last target window.List<Window>listWindows()WindowtargetWindow()Returns the last stored target window.voidtargetWindow(int windowIndex)Stores the window returned fromWindowFinder.window(int)as the new last target window.voidtargetWindow(String stageTitleRegex)Stores the stage whose title matches the given regex as the new last target window.voidtargetWindow(Predicate<Window> predicate)Stores the first window that is closes by proximity to the last stored target window and passes the given predicate as the new last target window or throws aNoSuchElementExceptionif none exist.voidtargetWindow(Pattern stageTitlePattern)Stores the stage whose title matches the given regex as the new last target window.voidtargetWindow(Node node)Stores the given node's scene's window as the new last target window.voidtargetWindow(Scene scene)Stores the given scene's window as the new last target window.voidtargetWindow(Window window)Stores the given window as the target window.Windowwindow(int windowIndex)Returns the window at the given index from the list of windows that are ordered by proximity to the last stored target window.Windowwindow(String stageTitleRegex)Returns the stage whose title matches the given regex.Windowwindow(Predicate<Window> predicate)CallsWindowFinder.listTargetWindows()and returns the first window that passes the predicate or throws aNoSuchElementExceptionif none exist.Windowwindow(Pattern stageTitlePattern)Returns the stage whose title matches the given regex.Windowwindow(Node node)Returns the node's scene's window.Windowwindow(Scene scene)Returns the scene's window.
-
-
-
Method Detail
-
targetWindow
public Window targetWindow()
Description copied from interface:WindowFinderReturns the last stored target window.- Specified by:
targetWindowin interfaceWindowFinder
-
targetWindow
public void targetWindow(Window window)
Description copied from interface:WindowFinderStores the given window as the target window.- Specified by:
targetWindowin interfaceWindowFinder
-
targetWindow
public void targetWindow(Predicate<Window> predicate)
Description copied from interface:WindowFinderStores the first window that is closes by proximity to the last stored target window and passes the given predicate as the new last target window or throws aNoSuchElementExceptionif none exist.- Specified by:
targetWindowin interfaceWindowFinder
-
listWindows
public List<Window> listWindows()
Description copied from interface:WindowFinder- Specified by:
listWindowsin interfaceWindowFinder
-
listTargetWindows
public List<Window> listTargetWindows()
Description copied from interface:WindowFinderReturns a list of windows that are ordered by proximity to the last target window.- Specified by:
listTargetWindowsin interfaceWindowFinder
-
window
public Window window(Predicate<Window> predicate)
Description copied from interface:WindowFinderCallsWindowFinder.listTargetWindows()and returns the first window that passes the predicate or throws aNoSuchElementExceptionif none exist.- Specified by:
windowin interfaceWindowFinder
-
targetWindow
public void targetWindow(int windowIndex)
Description copied from interface:WindowFinderStores the window returned fromWindowFinder.window(int)as the new last target window.- Specified by:
targetWindowin interfaceWindowFinder
-
targetWindow
public void targetWindow(String stageTitleRegex)
Description copied from interface:WindowFinderStores the stage whose title matches the given regex as the new last target window.- Specified by:
targetWindowin interfaceWindowFinder
-
targetWindow
public void targetWindow(Pattern stageTitlePattern)
Description copied from interface:WindowFinderStores the stage whose title matches the given regex as the new last target window.- Specified by:
targetWindowin interfaceWindowFinder
-
targetWindow
public void targetWindow(Scene scene)
Description copied from interface:WindowFinderStores the given scene's window as the new last target window.- Specified by:
targetWindowin interfaceWindowFinder
-
targetWindow
public void targetWindow(Node node)
Description copied from interface:WindowFinderStores the given node's scene's window as the new last target window.- Specified by:
targetWindowin interfaceWindowFinder
-
window
public Window window(int windowIndex)
Description copied from interface:WindowFinderReturns the window at the given index from the list of windows that are ordered by proximity to the last stored target window.- Specified by:
windowin interfaceWindowFinder
-
window
public Window window(String stageTitleRegex)
Description copied from interface:WindowFinderReturns the stage whose title matches the given regex.- Specified by:
windowin interfaceWindowFinder
-
window
public Window window(Pattern stageTitlePattern)
Description copied from interface:WindowFinderReturns the stage whose title matches the given regex.- Specified by:
windowin interfaceWindowFinder
-
window
public Window window(Scene scene)
Description copied from interface:WindowFinderReturns the scene's window.- Specified by:
windowin interfaceWindowFinder
-
window
public Window window(Node node)
Description copied from interface:WindowFinderReturns the node's scene's window.- Specified by:
windowin interfaceWindowFinder
-
-