Class OffsetOriginStep.Position
java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
org.opensourcephysics.media.core.TPoint
org.opensourcephysics.cabrillo.tracker.OffsetOriginStep.Position
- All Implemented Interfaces:
Serializable,Cloneable,Drawable,Interactive,Measurable,Trackable
- Enclosing class:
- OffsetOriginStep
A class to represent the position of the offset origin.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float -
Field Summary
Fields inherited from class org.opensourcephysics.media.core.TPoint
attachedTo, coordsEditTrigger, coordsVisibleInMouseBox, enabled, isAdjusting, prevX, prevY, screenPt, stepEditTrigger, support, toScreen, trackEditTrigger, worldPt, xyStringBuilderFields inherited from class java.awt.geom.Point2D.Double
x, yFields inherited from interface org.opensourcephysics.media.core.Trackable
PROPERTY_ADJUSTING -
Constructor Summary
ConstructorsConstructorDescriptionPosition(double x, double y) Constructs a position with specified image coordinates, and transforms those coordinates to set the world coordinates. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAdjusting(boolean adjusting, MouseEvent e) Overrides TPoint method.voidsetXY(double x, double y) Overrides TPoint setXY method.voidshowCoordinates(VideoPanel vidPanel) Overrides TPoint showCoordinates method.Methods inherited from class org.opensourcephysics.media.core.TPoint
addPropertyChangeListener, addPropertyChangeListener, angle, angle, attachTo, center, cos, cos, detach, draw, equals, findInteractive, getBounds, getFrameNumber, getScreenPosition, getWorldPosition, getXMax, getXMin, getYMax, getYMin, isAdjusting, isAttached, isCoordsEditTrigger, isEnabled, isMeasured, isStepEditTrigger, isTrackEditTrigger, removePropertyChangeListener, removePropertyChangeListener, setCoordsEditTrigger, setEnabled, setLocation, setPositionOnLine, setScreenPosition, setScreenPosition, setStepEditTrigger, setTrackEditTrigger, setWorldPosition, setX, setY, sin, sin, toString, translateMethods inherited from class java.awt.geom.Point2D.Double
getX, getYMethods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocationMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Interactive
getX, getY, isInteractive
-
Constructor Details
-
Position
public Position(double x, double y) Constructs a position with specified image coordinates, and transforms those coordinates to set the world coordinates.- Parameters:
x- the image x coordinatey- the image y coordinate
-
-
Method Details
-
setXY
public void setXY(double x, double y) Overrides TPoint setXY method. This moves the origin so the world coordinates do not change.- Specified by:
setXYin interfaceInteractive- Overrides:
setXYin classTPoint- Parameters:
x- the x positiony- the y position
-
setAdjusting
Overrides TPoint method.- Overrides:
setAdjustingin classTPoint- Parameters:
adjusting- true if being draggede- a MouseEvent, may be null
-
showCoordinates
Overrides TPoint showCoordinates method. This updates the values of the x and y fields.- Overrides:
showCoordinatesin classTPoint- Parameters:
vidPanel- the video panel
-