Class WorldRuler
java.lang.Object
org.opensourcephysics.cabrillo.tracker.Ruler
org.opensourcephysics.cabrillo.tracker.WorldRuler
This draws ruled lines and labels for a tape measure.
- Author:
- Douglas Brown
-
Field Summary
Fields inherited from class org.opensourcephysics.cabrillo.tracker.Ruler
alpha, baseStrokes, colors, DASHED_LINE, dashedStroke, DEFAULT_LABEL_GAP, DEFAULT_LINE_GAP, DEFAULT_RULER_SIZE, format, handle, hitShapeVisible, insetPerLevel, labelGap, labelMarks, labelTransform, lineGap, lines, MAX_RULER_LINE_SPACING, MAX_RULER_SIZE, MIN_INSET_PER_LEVEL, MIN_RULER_LINE_SPACING, multiShapes, NUMBER_OF_LEVELS, previousAngle, previousDistFromLineEnd, previousLineSpacing, prevSigFigs, rulerLineSpacing, rulerSize, strokes, track, transform, utilityPoint, visible
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Interactive
findInteractive
(TrackerPanel trackerPanel, Rectangle hitRect) Returns the Handle if this Ruler's hit shape intersects the supplied Rectangle.protected Mark
getMark
(TrackerPanel trackerPanel, int n) Gets the mark to draw for a given frame.protected void
setHandleXY
(double x, double y) Set the handle position in image units.Methods inherited from class org.opensourcephysics.cabrillo.tracker.Ruler
getAlpha, getColor, getFormattedValue, getHandle, getLineSpacing, getRulerSize, getScreenDistanceToBase, getStrokeWidth, isLeft, isVisible, refreshStrokes, setAlpha, setColor, setHitShapeVisible, setLineSpacing, setRulerSize, setStrokeWidth, setVisible
-
Constructor Details
-
WorldRuler
Constructor.- Parameters:
tape
- a tape measure
-
-
Method Details
-
getMark
Description copied from class:Ruler
Gets the mark to draw for a given frame. -
findInteractive
Description copied from class:Ruler
Returns the Handle if this Ruler's hit shape intersects the supplied Rectangle.- Overrides:
findInteractive
in classRuler
- Parameters:
trackerPanel
- the TrackerPanelhitRect
- 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 classRuler
-