Class CoordAxesStep

java.lang.Object
org.opensourcephysics.cabrillo.tracker.Step
org.opensourcephysics.cabrillo.tracker.CoordAxesStep
All Implemented Interfaces:
Cloneable

public class CoordAxesStep extends Step
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
  • Constructor Details

    • CoordAxesStep

      public CoordAxesStep(CoordAxes track, int n)
      Constructs an AxesStep.
      Parameters:
      track - the track
      n - the frame number
  • Method Details

    • getOrigin

      public TPoint getOrigin()
      Gets the origin.
      Returns:
      the origin
    • getHandle

      public TPoint 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

      public Interactive findInteractive(DrawingPanel panel, int xpix, int ypix)
      Overrides Step findInteractive method.
      Overrides:
      findInteractive in class Step
      Parameters:
      panel - the drawing panel
      xpix - the x pixel position
      ypix - the y pixel position
      Returns:
      the TPoint that is hit, or null
    • draw

      public void draw(DrawingPanel panel, Graphics _g)
      Overrides Step draw method.
      Overrides:
      draw in class Step
      Parameters:
      panel - the drawing panel requesting the drawing
      _g - the graphics context on which to draw
    • getMark

      protected Mark getMark(TrackerPanel trackerPanel)
      Overrides Step getMark method.
      Overrides:
      getMark in class Step
      Parameters:
      trackerPanel - the tracker panel
      Returns:
      the mark
    • getPointIndex

      public int getPointIndex(TPoint p)
      Overrides Step getPointIndex method.
      Overrides:
      getPointIndex in class Step
      Parameters:
      p - the point
      Returns:
      the index, or -1 if not found
    • clone

      public Object clone()
      Clones this Step.
      Overrides:
      clone in class Step
      Returns:
      a clone of this step
    • toString

      public String toString()
      Returns a String describing this.
      Overrides:
      toString in class Step
      Returns:
      a descriptive string
    • 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.
      Overrides:
      dispose in class Step