- java.lang.Object
-
- org.testfx.service.finder.impl.NodeFinderImpl
-
- All Implemented Interfaces:
NodeFinder
public class NodeFinderImpl extends Object implements NodeFinder
-
-
Constructor Summary
Constructors Constructor Description NodeFinderImpl(WindowFinder windowFinder)
-
Method Summary
Modifier and Type Method Description NodeQuery
from(Collection<javafx.scene.Node> parentNodes)
Returns aNodeQuery
that stores the given parentNodes collection.NodeQuery
from(javafx.scene.Node... parentNodes)
Returns aNodeQuery
that stores the given parentNodesNodeQuery
from(NodeQuery nodeQuery)
Returns a newNodeQuery
that stores all the parentNodes from the given nodeQuery (essentially, it creates a copy/clone).NodeQuery
fromAll()
Returns aNodeQuery
that stores all the root nodes of all windows viaWindowFinder.listTargetWindows()
NodeQuery
lookup(String query)
Returns aNodeQuery
that stores all the root nodes that meet the given query<T extends javafx.scene.Node>
NodeQuerylookup(Predicate<T> predicate)
Returns aNodeQuery
that stores all the root nodes that pass the given predicate<T> NodeQuery
lookup(org.hamcrest.Matcher<T> matcher)
Returns aNodeQuery
that stores all the root nodes that match the given matcher.javafx.scene.Node
rootNode(javafx.scene.Node node)
Returns the node's scene's root nodejavafx.scene.Node
rootNode(javafx.scene.Scene scene)
Returns the scene's root nodejavafx.scene.Node
rootNode(javafx.stage.Window window)
Returns the window's scene's root node.
-
-
-
Constructor Detail
-
NodeFinderImpl
public NodeFinderImpl(WindowFinder windowFinder)
-
-
Method Detail
-
lookup
public NodeQuery lookup(String query)
Description copied from interface:NodeFinder
Returns aNodeQuery
that stores all the root nodes that meet the given query- Specified by:
lookup
in interfaceNodeFinder
- See Also:
NodeQuery.lookup(String)
-
lookup
public <T> NodeQuery lookup(org.hamcrest.Matcher<T> matcher)
Description copied from interface:NodeFinder
Returns aNodeQuery
that stores all the root nodes that match the given matcher.- Specified by:
lookup
in interfaceNodeFinder
- See Also:
NodeQuery.lookup(Matcher)
-
lookup
public <T extends javafx.scene.Node> NodeQuery lookup(Predicate<T> predicate)
Description copied from interface:NodeFinder
Returns aNodeQuery
that stores all the root nodes that pass the given predicate- Specified by:
lookup
in interfaceNodeFinder
- See Also:
NodeQuery.lookup(Predicate)
-
fromAll
public NodeQuery fromAll()
Description copied from interface:NodeFinder
Returns aNodeQuery
that stores all the root nodes of all windows viaWindowFinder.listTargetWindows()
- Specified by:
fromAll
in interfaceNodeFinder
-
from
public NodeQuery from(javafx.scene.Node... parentNodes)
Description copied from interface:NodeFinder
Returns aNodeQuery
that stores the given parentNodes- Specified by:
from
in interfaceNodeFinder
-
from
public NodeQuery from(Collection<javafx.scene.Node> parentNodes)
Description copied from interface:NodeFinder
Returns aNodeQuery
that stores the given parentNodes collection.- Specified by:
from
in interfaceNodeFinder
-
from
public NodeQuery from(NodeQuery nodeQuery)
Description copied from interface:NodeFinder
Returns a newNodeQuery
that stores all the parentNodes from the given nodeQuery (essentially, it creates a copy/clone).- Specified by:
from
in interfaceNodeFinder
-
rootNode
public javafx.scene.Node rootNode(javafx.stage.Window window)
Description copied from interface:NodeFinder
Returns the window's scene's root node.- Specified by:
rootNode
in interfaceNodeFinder
-
rootNode
public javafx.scene.Node rootNode(javafx.scene.Scene scene)
Description copied from interface:NodeFinder
Returns the scene's root node- Specified by:
rootNode
in interfaceNodeFinder
-
rootNode
public javafx.scene.Node rootNode(javafx.scene.Node node)
Description copied from interface:NodeFinder
Returns the node's scene's root node- Specified by:
rootNode
in interfaceNodeFinder
-
-