Class CoordAxesStep
java.lang.Object
org.opensourcephysics.cabrillo.tracker.Step
org.opensourcephysics.cabrillo.tracker.CoordAxesStep
- All Implemented Interfaces:
Cloneable
This is a Step for a CoordAxes. It is used for displaying the axes and for
setting the origin, angle and/or scale of an ImageCoordSystem.
- Author:
- Douglas Brown
-
Field Summary
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones this Step.protected void
dispose()
Disposes of this step.void
draw
(DrawingPanel panel, Graphics _g) Overrides Step draw method.findInteractive
(DrawingPanel panel, int xpix, int ypix) Overrides Step findInteractive method.Gets the handle.static int
Gets the step length.protected Mark
getMark
(TrackerPanel trackerPanel) Overrides Step getMark method.Gets the origin.int
Overrides Step getPointIndex method.boolean
Gets whether the handle is enabled.boolean
Gets whether the origin is enabled.void
setHandleEnabled
(boolean enabled) Enables and disables the interactivity of the handle.void
setOriginEnabled
(boolean enabled) /** Enables and disables the interactivity of the origin.toString()
Returns a String describing this.Methods inherited from class org.opensourcephysics.cabrillo.tracker.Step
erase, erase, getDefaultPoint, getFrameNumber, getPoints, getTrack, remark, remark, repaint, repaint, setDefaultPointIndex, setFootprint, setHitRectCenter
-
Constructor Details
-
CoordAxesStep
Constructs an AxesStep.- Parameters:
track
- the trackn
- the frame number
-
-
Method Details
-
getOrigin
Gets the origin.- Returns:
- the origin
-
getHandle
Gets the handle.- Returns:
- the origin
-
setOriginEnabled
public void setOriginEnabled(boolean enabled) /** Enables and disables the interactivity of the origin.- Parameters:
enabled
-true
to enable the origin
-
isOriginEnabled
public boolean isOriginEnabled()Gets whether the origin is enabled.- Returns:
true
if the origin is enabled
-
setHandleEnabled
public void setHandleEnabled(boolean enabled) Enables and disables the interactivity of the handle.- Parameters:
enabled
-true
to enable the handle
-
isHandleEnabled
public boolean isHandleEnabled()Gets whether the handle is enabled.- Returns:
true
if the handle is enabled
-
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
-
draw
Overrides Step draw method. -
getMark
Overrides Step getMark method. -
getPointIndex
Overrides Step getPointIndex method.- Overrides:
getPointIndex
in classStep
- Parameters:
p
- the point- Returns:
- the index, or -1 if not found
-
clone
Clones this Step. -
toString
Returns a String describing this. -
getLength
public static int getLength()Gets the step length.- Returns:
- the length of the points array
-
dispose
protected void dispose()Description copied from class:Step
Disposes of this step.
-