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 voiddispose()Disposes of this step.voiddraw(DrawingPanel panel, Graphics _g) Overrides Step draw method.findInteractive(DrawingPanel panel, int xpix, int ypix) Overrides Step findInteractive method.Gets the handle.static intGets the step length.protected MarkgetMark(TrackerPanel trackerPanel) Overrides Step getMark method.Gets the origin.intOverrides Step getPointIndex method.booleanGets whether the handle is enabled.booleanGets whether the origin is enabled.voidsetHandleEnabled(boolean enabled) Enables and disables the interactivity of the handle.voidsetOriginEnabled(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-trueto enable the origin
-
isOriginEnabled
public boolean isOriginEnabled()Gets whether the origin is enabled.- Returns:
trueif the origin is enabled
-
setHandleEnabled
public void setHandleEnabled(boolean enabled) Enables and disables the interactivity of the handle.- Parameters:
enabled-trueto enable the handle
-
isHandleEnabled
public boolean isHandleEnabled()Gets whether the handle is enabled.- Returns:
trueif the handle is enabled
-
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
-
draw
Overrides Step draw method. -
getMark
Overrides Step getMark method. -
getPointIndex
Overrides Step getPointIndex method.- Overrides:
getPointIndexin 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:StepDisposes of this step.
-