Class PositionStep
java.lang.Object
org.opensourcephysics.cabrillo.tracker.Step
org.opensourcephysics.cabrillo.tracker.PositionStep
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
MultiPositionStep
This is a Step that represents a position. It is used by PointMass tracks.
- Author:
- Douglas Brown
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CircleFootprint
protected boolean
protected PositionStep.Position
protected Map<Integer,
OSPRuntime.TextLayout> protected boolean
Fields inherited from class org.opensourcephysics.cabrillo.tracker.Step
dataVisible, defaultIndex, footprint, format, hitRect, n, panelMarks, points, screenPoints, selectionShape, selectionStroke, trackID, transform, type, TYPE_ACCELERATION, TYPE_UNKNOWN, TYPE_VELOCITY, valid
-
Constructor Summary
ConstructorsConstructorDescriptionPositionStep
(PointMass track, int n, double x, double y) Constructs a PositionStep with specified image coordinates. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones this Step.void
draw
(DrawingPanel panel, Graphics _g) Overrides Step draw method.findInteractive
(DrawingPanel panel, int xpix, int ypix) Overrides Step findInteractive method.protected Point
getLayoutPosition
(TrackerPanel trackerPanel) Gets TextLayout screen position.static XML.ObjectLoader
Returns an ObjectLoader to save and load data for this class.protected Mark
getMark
(TrackerPanel trackerPanel) Overrides Step getMark method.Gets the position TPoint.boolean
Gets the label visibility.boolean
Gets the rollover visibility.void
setLabelVisible
(boolean visible) Sets the label visibility.void
setRolloverVisible
(boolean visible) Sets the rollover visibility.toString()
Returns a String describing this.Methods inherited from class org.opensourcephysics.cabrillo.tracker.Step
dispose, erase, erase, getDefaultPoint, getFrameNumber, getLength, getPointIndex, getPoints, getTrack, remark, remark, repaint, repaint, setDefaultPointIndex, setFootprint, setHitRectCenter
-
Field Details
-
p
-
labelVisible
protected boolean labelVisible -
rolloverVisible
protected boolean rolloverVisible -
panelTextLayouts
-
panelLayoutBounds
-
innerCircleFootprint
-
-
Constructor Details
-
PositionStep
Constructs a PositionStep with specified image coordinates.- Parameters:
track
- the PointMass trackn
- the frame numberx
- the x coordinatey
- the y coordinate
-
-
Method Details
-
getPosition
Gets the position TPoint.- Returns:
- the position TPoint
-
isLabelVisible
public boolean isLabelVisible()Gets the label visibility.- Returns:
true
if label is visible
-
setLabelVisible
public void setLabelVisible(boolean visible) Sets the label visibility.- Parameters:
visible
-true
to make label visible
-
isRolloverVisible
public boolean isRolloverVisible()Gets the rollover visibility.- Returns:
true
if labels are visible on rollover only
-
setRolloverVisible
public void setRolloverVisible(boolean visible) Sets the rollover visibility.- Parameters:
visible
-true
to make labels visible on rollover only
-
draw
Overrides Step draw method. -
findInteractive
Overrides Step findInteractive method.- Overrides:
findInteractive
in classStep
- Parameters:
panel
- the drawing panelxpix
- the x pixel positionypix
- the y pixel position- Returns:
- the TPoint that is hit, or null
-
getMark
Overrides Step getMark method. -
clone
Clones this Step. -
toString
Returns a String describing this. -
getLayoutPosition
Gets TextLayout screen position.- Parameters:
trackerPanel
- the tracker panel- Returns:
- the screen position point
-
getLoader
Returns an ObjectLoader to save and load data for this class.- Returns:
- the object loader
-