use of org.testfx.service.locator.PointLocator in project TestFX by TestFX.
the class FxRobot method point.
@Override
public PointQuery point(double x, double y) {
PointLocator pointLocator = context.getPointLocator();
Pos pointPosition = context.getPointPosition();
return pointLocator.point(new Point2D(x, y)).atPosition(pointPosition);
}
use of org.testfx.service.locator.PointLocator in project TestFX by TestFX.
the class FxRobot method point.
@Override
public PointQuery point(Bounds bounds) {
PointLocator pointLocator = context.getPointLocator();
Pos pointPosition = context.getPointPosition();
return pointLocator.point(bounds).atPosition(pointPosition);
}
use of org.testfx.service.locator.PointLocator in project TestFX by TestFX.
the class FxRobot method point.
@Override
public PointQuery point(Scene scene) {
PointLocator pointLocator = context.getPointLocator();
Pos pointPosition = context.getPointPosition();
targetWindow(scene.getWindow());
return pointLocator.point(scene).atPosition(pointPosition);
}
use of org.testfx.service.locator.PointLocator in project TestFX by TestFX.
the class FxRobot method point.
@Override
public PointQuery point(Point2D point) {
PointLocator pointLocator = context.getPointLocator();
Pos pointPosition = context.getPointPosition();
return pointLocator.point(point).atPosition(pointPosition);
}
use of org.testfx.service.locator.PointLocator in project TestFX by TestFX.
the class AwtRobotAdapterTest method setup.
@Before
public void setup() throws Exception {
robotAdapter = new AwtRobotAdapter();
targetStage = FxToolkit.setupStage(stage -> {
region = new Region();
region.setStyle("-fx-background-color: magenta;");
VBox box = new VBox(region);
box.setPadding(new Insets(10));
box.setSpacing(10);
VBox.setVgrow(region, Priority.ALWAYS);
sceneRoot = new StackPane(box);
Scene scene = new Scene(sceneRoot, 300, 100);
stage.setScene(scene);
stage.show();
});
PointLocator pointLocator = new PointLocatorImpl(new BoundsLocatorImpl());
regionPoint = pointLocator.point(region).atPosition(Pos.CENTER).query();
}
Aggregations