Package org.testfx.service.locator.impl
Class BoundsLocatorImpl
- java.lang.Object
-
- org.testfx.service.locator.impl.BoundsLocatorImpl
-
- All Implemented Interfaces:
BoundsLocator
public class BoundsLocatorImpl extends java.lang.Object implements BoundsLocator
-
-
Constructor Summary
Constructors Constructor Description BoundsLocatorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanareBoundsVisible(javafx.geometry.Bounds bounds)javafx.geometry.BoundsboundsInSceneFor(javafx.scene.Node node)javafx.geometry.BoundsboundsInWindowFor(javafx.geometry.Bounds boundsInScene, javafx.scene.Scene scene)javafx.geometry.BoundsboundsInWindowFor(javafx.scene.Scene scene)javafx.geometry.BoundsboundsOnScreenFor(javafx.geometry.Bounds boundsInScene, javafx.scene.Scene scene)javafx.geometry.BoundsboundsOnScreenFor(javafx.scene.Node node)javafx.geometry.BoundsboundsOnScreenFor(javafx.scene.Scene scene)javafx.geometry.BoundsboundsOnScreenFor(javafx.stage.Window window)private javafx.geometry.BoundsintersectBounds(javafx.geometry.Bounds a, javafx.geometry.Bounds b)private javafx.geometry.BoundslimitToVisibleBounds(javafx.geometry.Bounds boundsInScene, javafx.scene.Scene scene)private javafx.geometry.BoundstranslateBounds(javafx.geometry.Bounds bounds, double x, double y)
-
-
-
Method Detail
-
boundsInSceneFor
public javafx.geometry.Bounds boundsInSceneFor(javafx.scene.Node node)
- Specified by:
boundsInSceneForin interfaceBoundsLocator- Parameters:
node- the node- Returns:
- the visible bounds (in terms of its Scene) of the node, which is limited by the bounds of its
Scene. If the node's bounds extend beyond the Scene's bounds, the excess will be removed.
-
boundsInWindowFor
public javafx.geometry.Bounds boundsInWindowFor(javafx.scene.Scene scene)
- Specified by:
boundsInWindowForin interfaceBoundsLocator- Parameters:
scene- the scene- Returns:
- the bounds of the scene
-
boundsInWindowFor
public javafx.geometry.Bounds boundsInWindowFor(javafx.geometry.Bounds boundsInScene, javafx.scene.Scene scene)- Specified by:
boundsInWindowForin interfaceBoundsLocator- Parameters:
boundsInScene- the bounds, which may extend beyond the scene's boundsscene- the scene used to set the bounds limits- Returns:
- the visible bounds (in terms of the Scene's Window) of the given
boundsInScene, which is limited by the bounds of the givenScene. If the former extends beyond the latter, the excess will be removed
-
boundsOnScreenFor
public javafx.geometry.Bounds boundsOnScreenFor(javafx.scene.Node node)
- Specified by:
boundsOnScreenForin interfaceBoundsLocator- Parameters:
node- the node.- Returns:
- the visible bounds (in terms of the screen) of the node, which is limited first by its
Scene's bounds and secondly by its Scene'sWindow's bounds
-
boundsOnScreenFor
public javafx.geometry.Bounds boundsOnScreenFor(javafx.scene.Scene scene)
- Specified by:
boundsOnScreenForin interfaceBoundsLocator- Parameters:
scene- the scene- Returns:
- the visible bounds (in terms of the screen) of the given Scene
-
boundsOnScreenFor
public javafx.geometry.Bounds boundsOnScreenFor(javafx.stage.Window window)
- Specified by:
boundsOnScreenForin interfaceBoundsLocator- Parameters:
window- the window- Returns:
- the bounds of the given window
-
boundsOnScreenFor
public javafx.geometry.Bounds boundsOnScreenFor(javafx.geometry.Bounds boundsInScene, javafx.scene.Scene scene)- Specified by:
boundsOnScreenForin interfaceBoundsLocator- Parameters:
boundsInScene- the initial bounds to convert to screen boundsscene- the scene that limits the boundsInScene- Returns:
- the visible bounds (in terms of the screen) of the given
boundsInScene, which is limited by the given Scene's bounds.
-
limitToVisibleBounds
private javafx.geometry.Bounds limitToVisibleBounds(javafx.geometry.Bounds boundsInScene, javafx.scene.Scene scene)
-
intersectBounds
private javafx.geometry.Bounds intersectBounds(javafx.geometry.Bounds a, javafx.geometry.Bounds b)
-
areBoundsVisible
private boolean areBoundsVisible(javafx.geometry.Bounds bounds)
-
translateBounds
private javafx.geometry.Bounds translateBounds(javafx.geometry.Bounds bounds, double x, double y)
-
-