Search in sources :

Example 1 with BoundsLocatorException

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

the class BoundsLocatorImpl method limitToVisibleBounds.

private Bounds limitToVisibleBounds(Bounds boundsInScene, Scene scene) {
    Bounds sceneBounds = new BoundingBox(0, 0, scene.getWidth(), scene.getHeight());
    Bounds visibleBounds = intersectBounds(boundsInScene, sceneBounds);
    if (!areBoundsVisible(visibleBounds)) {
        throw new BoundsLocatorException("bounds are not visible in Scene");
    }
    return visibleBounds;
}
Also used : BoundsLocatorException(org.testfx.service.locator.BoundsLocatorException) Bounds(javafx.geometry.Bounds) BoundingBox(javafx.geometry.BoundingBox)

Aggregations

BoundingBox (javafx.geometry.BoundingBox)1 Bounds (javafx.geometry.Bounds)1 BoundsLocatorException (org.testfx.service.locator.BoundsLocatorException)1