Class WorldRuler

java.lang.Object
org.opensourcephysics.cabrillo.tracker.Ruler
org.opensourcephysics.cabrillo.tracker.WorldRuler

public class WorldRuler extends Ruler
This draws ruled lines and labels for a tape measure.
Author:
Douglas Brown
  • Constructor Details

    • WorldRuler

      public WorldRuler(TapeMeasure tape)
      Constructor.
      Parameters:
      tape - a tape measure
  • Method Details

    • getMark

      protected Mark getMark(TrackerPanel trackerPanel, int n)
      Description copied from class: Ruler
      Gets the mark to draw for a given frame.
      Specified by:
      getMark in class Ruler
      Parameters:
      trackerPanel - the TrackerPanel to draw on
      n - the frame number
      Returns:
      the Mark
    • findInteractive

      protected Interactive findInteractive(TrackerPanel trackerPanel, Rectangle hitRect)
      Description copied from class: Ruler
      Returns the Handle if this Ruler's hit shape intersects the supplied Rectangle.
      Overrides:
      findInteractive in class Ruler
      Parameters:
      trackerPanel - the TrackerPanel
      hitRect - the Rectangle
      Returns:
      the Handle if hit
    • setHandleXY

      protected void setHandleXY(double x, double y)
      Description copied from class: Ruler
      Set the handle position in image units.
      Overrides:
      setHandleXY in class Ruler