use of org.testfx.service.locator.impl.PointLocatorImpl 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();
}
use of org.testfx.service.locator.impl.PointLocatorImpl in project TestFX by TestFX.
the class GlassRobotAdapterTest method setup.
@Before
public void setup() throws Exception {
robotAdapter = new GlassRobotAdapter();
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());
regionCenter = pointLocator.point(region).atPosition(Pos.CENTER).query();
}
Aggregations