Package org.testfx.service.query.impl
Class PointQueryBase
- java.lang.Object
-
- org.testfx.service.query.impl.PointQueryBase
-
- All Implemented Interfaces:
PointQuery
- Direct Known Subclasses:
BoundsPointQuery,CallableBoundsPointQuery
public abstract class PointQueryBase extends java.lang.Object implements PointQuery
-
-
Constructor Summary
Constructors Constructor Description PointQueryBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointQueryatOffset(double offsetX, double offsetY)UpdatesPointQuery.getOffset()by the combination of the currentoffset'sxvalue andoffsetXand itsyvalue andoffsetY.PointQueryatOffset(javafx.geometry.Point2D offset)UpdatesPointQuery.getOffset()to benew Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY()).PointQueryatPosition(double positionX, double positionY)UpdatesPointQuery.getPosition()to the newposition.PointQueryatPosition(javafx.geometry.Point2D position)UpdatesPointQuery.getPosition()to the newposition.PointQueryatPosition(javafx.geometry.Pos position)UpdatesPointQuery.getPosition()to a new one based on the givenposition.javafx.geometry.Point2DgetOffset()javafx.geometry.Point2DgetPosition()PointQueryonNode(javafx.scene.Node node)java.util.Optional<Motion>queryMotion()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.testfx.service.query.PointQuery
query
-
-
-
-
Method Detail
-
getPosition
public javafx.geometry.Point2D getPosition()
- Specified by:
getPositionin interfacePointQuery- Returns:
- the position that stores the
xandypercentages (0.0 = 0% to 1.0 = 100%) to use when calculating a relative position within aBoundsobject.
-
getOffset
public javafx.geometry.Point2D getOffset()
- Specified by:
getOffsetin interfacePointQuery- Returns:
- the amount by which to offset the point calculated via
PointQuery.getPosition().
-
atPosition
public PointQuery atPosition(javafx.geometry.Point2D position)
Description copied from interface:PointQueryUpdatesPointQuery.getPosition()to the newposition.- Specified by:
atPositionin interfacePointQuery- Parameters:
position- the new position- Returns:
- itself
-
atPosition
public PointQuery atPosition(double positionX, double positionY)
Description copied from interface:PointQueryUpdatesPointQuery.getPosition()to the newposition.- Specified by:
atPositionin interfacePointQuery- 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
public PointQuery atPosition(javafx.geometry.Pos position)
Description copied from interface:PointQueryUpdatesPointQuery.getPosition()to a new one based on the givenposition.- Specified by:
atPositionin interfacePointQuery- Parameters:
position- left/up = 0.0 (0%); center = 0.5 (50%); right/down = 1.0 (100%)- Returns:
- itself
-
atOffset
public PointQuery atOffset(javafx.geometry.Point2D offset)
Description copied from interface:PointQueryUpdatesPointQuery.getOffset()to benew Point2D(this.offset.getX() + offset.getX(), this.offset.getY() + offset.getY()).- Specified by:
atOffsetin interfacePointQuery- Parameters:
offset- the amount by which to increase/decrease the offset's x and y values- Returns:
- itself
-
atOffset
public PointQuery atOffset(double offsetX, double offsetY)
Description copied from interface:PointQueryUpdatesPointQuery.getOffset()by the combination of the currentoffset'sxvalue andoffsetXand itsyvalue andoffsetY.- Specified by:
atOffsetin interfacePointQuery- 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
-
onNode
public PointQuery onNode(javafx.scene.Node node)
- Specified by:
onNodein interfacePointQuery
-
queryMotion
public java.util.Optional<Motion> queryMotion()
- Specified by:
queryMotionin interfacePointQuery
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-