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 InteractivefindInteractive(TrackerPanel trackerPanel, Rectangle hitRect) Returns the Handle if this Ruler's hit shape intersects the supplied Rectangle.protected MarkgetMark(TrackerPanel trackerPanel, int n) Gets the mark to draw for a given frame.protected voidsetHandleXY(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:RulerGets the mark to draw for a given frame. -
findInteractive
Description copied from class:RulerReturns the Handle if this Ruler's hit shape intersects the supplied Rectangle.- Overrides:
findInteractivein classRuler- Parameters:
trackerPanel- the TrackerPanelhitRect- the Rectangle- Returns:
- the Handle if hit
-
setHandleXY
protected void setHandleXY(double x, double y) Description copied from class:RulerSet the handle position in image units.- Overrides:
setHandleXYin classRuler
-