-
- All Known Implementing Classes:
BoundsPointQuery
,CallableBoundsPointQuery
,PointQueryBase
public interface PointQuery
Used to calculate a position within a givenBounds
.
-
-
Method Summary
Modifier and Type Method Description PointQuery
atOffset(double offsetX, double offsetY)
UpdatesgetOffset()
by the combination of the currentoffset
'sx
value andoffsetX
and itsy
value andoffsetY
.PointQuery
atOffset(javafx.geometry.Point2D offset)
UpdatesgetOffset()
to benew Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY())
.PointQuery
atPosition(double positionX, double positionY)
UpdatesgetPosition()
to the newposition
.PointQuery
atPosition(javafx.geometry.Point2D position)
UpdatesgetPosition()
to the newposition
.PointQuery
atPosition(javafx.geometry.Pos position)
UpdatesgetPosition()
to a new one based on the givenposition
.javafx.geometry.Point2D
getOffset()
javafx.geometry.Point2D
getPosition()
PointQuery
onNode(javafx.scene.Node node)
javafx.geometry.Point2D
query()
Optional<Motion>
queryMotion()
-
-
-
Method Detail
-
getPosition
javafx.geometry.Point2D getPosition()
- Returns:
- the position that stores the
x
andy
percentages (0.0 = 0% to 1.0 = 100%) to use when calculating a relative position within aBounds
object.
-
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
'sx
value andoffsetX
and itsy
value 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
Bounds
object that is calculated viagetPosition()
bygetOffset()
amount.
-
onNode
PointQuery onNode(javafx.scene.Node node)
-
-