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 CircleFootprintprotected booleanprotected PositionStep.Positionprotected Map<Integer,OSPRuntime.TextLayout> protected booleanFields 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.voiddraw(DrawingPanel panel, Graphics _g) Overrides Step draw method.findInteractive(DrawingPanel panel, int xpix, int ypix) Overrides Step findInteractive method.protected PointgetLayoutPosition(TrackerPanel trackerPanel) Gets TextLayout screen position.static XML.ObjectLoaderReturns an ObjectLoader to save and load data for this class.protected MarkgetMark(TrackerPanel trackerPanel) Overrides Step getMark method.Gets the position TPoint.booleanGets the label visibility.booleanGets the rollover visibility.voidsetLabelVisible(boolean visible) Sets the label visibility.voidsetRolloverVisible(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:
trueif label is visible
-
setLabelVisible
public void setLabelVisible(boolean visible) Sets the label visibility.- Parameters:
visible-trueto make label visible
-
isRolloverVisible
public boolean isRolloverVisible()Gets the rollover visibility.- Returns:
trueif labels are visible on rollover only
-
setRolloverVisible
public void setRolloverVisible(boolean visible) Sets the rollover visibility.- Parameters:
visible-trueto make labels visible on rollover only
-
draw
Overrides Step draw method. -
findInteractive
Overrides Step findInteractive method.- Overrides:
findInteractivein 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
-