@Unstable public abstract class PointQueryBase extends Object implements PointQuery
Constructor and Description |
---|
PointQueryBase() |
Modifier and Type | Method and Description |
---|---|
PointQuery |
atOffset(double offsetX,
double offsetY)
Updates
PointQuery.getOffset() by the combination of the current offset 's x value and
offsetX and its y value and offsetY . |
PointQuery |
atOffset(Point2D offset)
Updates
PointQuery.getOffset() to be
new Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY()) . |
PointQuery |
atPosition(double positionX,
double positionY)
Updates
PointQuery.getPosition() to the new position |
PointQuery |
atPosition(Point2D position)
Updates
PointQuery.getPosition() to the new position |
PointQuery |
atPosition(Pos position)
Updates
PointQuery.getPosition() to a new one based on the given position . |
Point2D |
getOffset() |
Point2D |
getPosition() |
PointQuery |
onNode(Node node) |
Optional<Motion> |
queryMotion() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
query
protected Node node
public Point2D getPosition()
getPosition
in interface PointQuery
x
and y
percentages (0.0 = 0% to 1.0 = 100%)
to use when calculating a relative position within a Bounds
object.public Point2D getOffset()
getOffset
in interface PointQuery
PointQuery.getPosition()
.public PointQuery atPosition(Point2D position)
PointQuery
PointQuery.getPosition()
to the new position
atPosition
in interface PointQuery
position
- the new positionpublic PointQuery atPosition(double positionX, double positionY)
PointQuery
PointQuery.getPosition()
to the new position
atPosition
in interface PointQuery
positionX
- the percentage to use: 0.0 (0%) to 1.0 (100%).positionY
- the percentage to use: 0.0 (0%) to 1.0 (100%).public PointQuery atPosition(Pos position)
PointQuery
PointQuery.getPosition()
to a new one based on the given position
.atPosition
in interface PointQuery
position
- left/up = 0.0 (0%); center = 0.5 (50%); right/down = 1.0 (100%)public PointQuery atOffset(Point2D offset)
PointQuery
PointQuery.getOffset()
to be
new Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY())
.atOffset
in interface PointQuery
offset
- the amount by which to increase/decrease the offset's x & y valuespublic PointQuery atOffset(double offsetX, double offsetY)
PointQuery
PointQuery.getOffset()
by the combination of the current offset
's x
value and
offsetX
and its y
value and offsetY
.atOffset
in interface PointQuery
offsetX
- the amount by which to increase/decrease the offset's x valueoffsetY
- the amount by which to increase/decrease the offset's y valuepublic PointQuery onNode(Node node)
onNode
in interface PointQuery
public Optional<Motion> queryMotion()
queryMotion
in interface PointQuery