Package org.testfx.service.locator.impl
Class PointLocatorImpl
- java.lang.Object
-
- org.testfx.service.locator.impl.PointLocatorImpl
-
- All Implemented Interfaces:
PointLocator
public class PointLocatorImpl extends java.lang.Object implements PointLocator
-
-
Field Summary
Fields Modifier and Type Field Description private BoundsLocatorboundsLocator
-
Constructor Summary
Constructors Constructor Description PointLocatorImpl(BoundsLocator boundsLocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointQuerypoint(javafx.geometry.Bounds bounds)PointQuerypoint(javafx.geometry.Point2D point)PointQuerypoint(javafx.scene.Node node)Returns the center of the givenNodein screen coordinates.PointQuerypoint(javafx.scene.Scene scene)PointQuerypoint(javafx.stage.Window window)
-
-
-
Field Detail
-
boundsLocator
private final BoundsLocator boundsLocator
-
-
Constructor Detail
-
PointLocatorImpl
public PointLocatorImpl(BoundsLocator boundsLocator)
-
-
Method Detail
-
point
public PointQuery point(javafx.geometry.Bounds bounds)
- Specified by:
pointin interfacePointLocator- Parameters:
bounds- the initial bounds with which to construct aPointQuery- Returns:
- a
PointQuerywith the given bounds as the initial bounds
-
point
public PointQuery point(javafx.geometry.Point2D point)
- Specified by:
pointin interfacePointLocator- Parameters:
point- to convert into aBoundsobject- Returns:
- a
PointQuerywhose bounds x and y values are the given point and whose width/height = 0
-
point
public PointQuery point(javafx.scene.Node node)
Description copied from interface:PointLocatorReturns the center of the givenNodein screen coordinates.- Specified by:
pointin interfacePointLocator- Parameters:
node- the node- Returns:
- a
PointQuerywith the node's bounds (in terms of the screen) as the initial bounds
-
point
public PointQuery point(javafx.scene.Scene scene)
- Specified by:
pointin interfacePointLocator- Parameters:
scene- the scene- Returns:
- a
PointQuerywith the scene's bounds (in terms of the screen) as the initial bounds
-
point
public PointQuery point(javafx.stage.Window window)
- Specified by:
pointin interfacePointLocator- Parameters:
window- the window- Returns:
- a
PointQuerywith the window's bounds (in terms of the screen) as the initial bounds
-
-