Package org.testfx.service.query
Interface PointQuery
-
- All Known Implementing Classes:
BoundsPointQuery,CallableBoundsPointQuery,PointQueryBase
public interface PointQueryUsed to calculate a position within a givenBounds.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PointQueryatOffset(double offsetX, double offsetY)UpdatesgetOffset()by the combination of the currentoffset'sxvalue andoffsetXand itsyvalue andoffsetY.PointQueryatOffset(javafx.geometry.Point2D offset)UpdatesgetOffset()to benew Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY()).PointQueryatPosition(double positionX, double positionY)UpdatesgetPosition()to the newposition.PointQueryatPosition(javafx.geometry.Point2D position)UpdatesgetPosition()to the newposition.PointQueryatPosition(javafx.geometry.Pos position)UpdatesgetPosition()to a new one based on the givenposition.javafx.geometry.Point2DgetOffset()javafx.geometry.Point2DgetPosition()PointQueryonNode(javafx.scene.Node node)javafx.geometry.Point2Dquery()java.util.Optional<Motion>queryMotion()
-
-
-
Method Detail
-
getPosition
javafx.geometry.Point2D getPosition()
- Returns:
- the position that stores the
xandypercentages (0.0 = 0% to 1.0 = 100%) to use when calculating a relative position within aBoundsobject.
-
getOffset
javafx.geometry.Point2D getOffset()
- Returns:
- the amount by which to offset the point calculated via
getPosition().
-
atPosition
PointQuery atPosition(javafx.geometry.Point2D position)
UpdatesgetPosition()to the newposition.- Parameters:
position- the new position- Returns:
- itself
-
atPosition
PointQuery atPosition(double positionX, double positionY)
UpdatesgetPosition()to the newposition.- Parameters:
positionX- the percentage to use: 0.0 (0%) to 1.0 (100%).positionY- the percentage to use: 0.0 (0%) to 1.0 (100%).- Returns:
- itself
-
atPosition
PointQuery atPosition(javafx.geometry.Pos position)
UpdatesgetPosition()to a new one based on the givenposition.- Parameters:
position- left/up = 0.0 (0%); center = 0.5 (50%); right/down = 1.0 (100%)- Returns:
- itself
-
atOffset
PointQuery atOffset(javafx.geometry.Point2D offset)
UpdatesgetOffset()to benew Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY()).- Parameters:
offset- the amount by which to increase/decrease the offset's x and y values- Returns:
- itself
-
atOffset
PointQuery atOffset(double offsetX, double offsetY)
UpdatesgetOffset()by the combination of the currentoffset'sxvalue andoffsetXand itsyvalue andoffsetY.- Parameters:
offsetX- the amount by which to increase/decrease the offset's x valueoffsetY- the amount by which to increase/decrease the offset's y value- Returns:
- itself
-
query
javafx.geometry.Point2D query()
- Returns:
- a position that offsets the relative position within the initial
Boundsobject that is calculated viagetPosition()bygetOffset()amount.
-
onNode
PointQuery onNode(javafx.scene.Node node)
-
queryMotion
java.util.Optional<Motion> queryMotion()
-
-