Search in sources :

Example 6 with PointLocator

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);
}
Also used : Pos(javafx.geometry.Pos) PointLocator(org.testfx.service.locator.PointLocator)

Example 7 with PointLocator

use of org.testfx.service.locator.PointLocator in project TestFX by TestFX.

the class FxRobot method point.

@Override
public PointQuery point(Window window) {
    PointLocator pointLocator = context.getPointLocator();
    Pos pointPosition = context.getPointPosition();
    targetWindow(window);
    return pointLocator.point(window).atPosition(pointPosition);
}
Also used : Pos(javafx.geometry.Pos) PointLocator(org.testfx.service.locator.PointLocator)

Example 8 with PointLocator

use of org.testfx.service.locator.PointLocator in project TestFX by TestFX.

the class FxRobot method point.

@Override
public PointQuery point(Node node) {
    PointLocator pointLocator = context.getPointLocator();
    Pos pointPosition = context.getPointPosition();
    targetWindow(node.getScene().getWindow());
    return pointLocator.point(node).onNode(node).atPosition(pointPosition);
}
Also used : Pos(javafx.geometry.Pos) PointLocator(org.testfx.service.locator.PointLocator)

Aggregations

Pos (javafx.geometry.Pos)8 PointLocator (org.testfx.service.locator.PointLocator)8 Point2D (javafx.geometry.Point2D)3 TimeUnit (java.util.concurrent.TimeUnit)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 EventHandler (javafx.event.EventHandler)2 Insets (javafx.geometry.Insets)2 Rectangle2D (javafx.geometry.Rectangle2D)2 Parent (javafx.scene.Parent)2 Scene (javafx.scene.Scene)2 Image (javafx.scene.image.Image)2 KeyCode (javafx.scene.input.KeyCode)2 KeyEvent (javafx.scene.input.KeyEvent)2 MouseButton (javafx.scene.input.MouseButton)2 MouseEvent (javafx.scene.input.MouseEvent)2 Priority (javafx.scene.layout.Priority)2 Region (javafx.scene.layout.Region)2 StackPane (javafx.scene.layout.StackPane)2 VBox (javafx.scene.layout.VBox)2 Color (javafx.scene.paint.Color)2