org.opensourcephysics.cabrillo.tracker
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:
- java.io.Serializable, java.lang.Cloneable, Drawable, Interactive, Measurable, Trackable
- Enclosing class:
- OffsetOriginStep
public class OffsetOriginStep.Position
- extends TPoint
A class to represent the position of the offset origin.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
| Fields inherited from class java.awt.geom.Point2D.Double |
x, y |
|
Constructor Summary |
OffsetOriginStep.Position(double x,
double y)
Constructs a position with specified image coordinates,
and transforms those coordinates to set the world coordinates. |
|
Method Summary |
void |
setAdjusting(boolean adjusting)
Overrides TPoint method. |
void |
setXY(double x,
double y)
Overrides TPoint setXY method. |
void |
showCoordinates(VideoPanel vidPanel)
Overrides TPoint showCoordinates method. |
| Methods inherited from class org.opensourcephysics.media.core.TPoint |
addPropertyChangeListener, addPropertyChangeListener, angle, angle, center, cos, cos, draw, equals, findInteractive, getBounds, getFrameNumber, getScreenPosition, getWorldPosition, getXMax, getXMin, getYMax, getYMin, isAdjusting, isAutotrackable, isCoordsEditTrigger, isEnabled, isMeasured, isStepEditTrigger, isTrackEditTrigger, removePropertyChangeListener, removePropertyChangeListener, setCoordsEditTrigger, setEnabled, setLocation, setPositionOnLine, setScreenPosition, setScreenPosition, setStepEditTrigger, setTrackEditTrigger, setX, setY, sin, sin, toString, translate |
| Methods inherited from class java.awt.geom.Point2D.Double |
getX, getY |
| Methods inherited from class java.awt.geom.Point2D |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
OffsetOriginStep.Position
public OffsetOriginStep.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
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:
setXY in interface Interactive- Overrides:
setXY in class TPoint
- Parameters:
x - the x positiony - the y position
setAdjusting
public void setAdjusting(boolean adjusting)
- Overrides TPoint method.
- Overrides:
setAdjusting in class TPoint
- Parameters:
adjusting - true if being dragged
showCoordinates
public void showCoordinates(VideoPanel vidPanel)
- Overrides TPoint showCoordinates method. This updates the values
of the x and y fields.
- Overrides:
showCoordinates in class TPoint
- Parameters:
vidPanel - the video panel