public class WindowFinderImpl extends Object implements WindowFinder
Constructor and Description |
---|
WindowFinderImpl() |
Modifier and Type | Method and Description |
---|---|
List<Window> |
listTargetWindows()
Returns a list of windows that are ordered by proximity to the last target window
|
List<Window> |
listWindows()
Calls
JavaVersionAdapter.getWindows() |
Window |
targetWindow()
Returns the last stored target window
|
void |
targetWindow(int windowIndex)
Stores the window returned from
WindowFinder.window(int) as the new last target window |
void |
targetWindow(Node node)
Stores the given node's scene's window as the new last target window
|
void |
targetWindow(Pattern stageTitlePattern)
Stores the stage whose title matches the given regex as the new last target window.
|
void |
targetWindow(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 a
NoSuchElementException
if none exist. |
void |
targetWindow(Scene scene)
Stores the given scene's window as the new last target window
|
void |
targetWindow(String stageTitleRegex)
Stores the stage whose title matches the given regex as the new last target window.
|
void |
targetWindow(Window window)
Stores the given window as the target window
|
Window |
window(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
|
Window |
window(Node node)
Returns the node's scene's window
|
Window |
window(Pattern stageTitlePattern)
Returns the stage whose title matches the given regex
|
Window |
window(Predicate<Window> predicate)
Calls
WindowFinder.listTargetWindows() and returns the first window that passes the predicate or throws
a NoSuchElementException if none exist. |
Window |
window(Scene scene)
Returns the scene's window
|
Window |
window(String stageTitleRegex)
Returns the stage whose title matches the given regex
|
public Window targetWindow()
WindowFinder
targetWindow
in interface WindowFinder
public void targetWindow(Window window)
WindowFinder
targetWindow
in interface WindowFinder
public void targetWindow(Predicate<Window> predicate)
WindowFinder
NoSuchElementException
if none exist.targetWindow
in interface WindowFinder
public List<Window> listWindows()
WindowFinder
JavaVersionAdapter.getWindows()
listWindows
in interface WindowFinder
public List<Window> listTargetWindows()
WindowFinder
listTargetWindows
in interface WindowFinder
public Window window(Predicate<Window> predicate)
WindowFinder
WindowFinder.listTargetWindows()
and returns the first window that passes the predicate or throws
a NoSuchElementException
if none exist.window
in interface WindowFinder
public void targetWindow(int windowIndex)
WindowFinder
WindowFinder.window(int)
as the new last target windowtargetWindow
in interface WindowFinder
public void targetWindow(String stageTitleRegex)
WindowFinder
targetWindow
in interface WindowFinder
public void targetWindow(Pattern stageTitlePattern)
WindowFinder
targetWindow
in interface WindowFinder
public void targetWindow(Scene scene)
WindowFinder
targetWindow
in interface WindowFinder
public void targetWindow(Node node)
WindowFinder
targetWindow
in interface WindowFinder
public Window window(int windowIndex)
WindowFinder
window
in interface WindowFinder
public Window window(String stageTitleRegex)
WindowFinder
window
in interface WindowFinder
public Window window(Pattern stageTitlePattern)
WindowFinder
window
in interface WindowFinder
public Window window(Scene scene)
WindowFinder
window
in interface WindowFinder
public Window window(Node node)
WindowFinder
window
in interface WindowFinder