Class PositionVectorFootprint
java.lang.Object
org.opensourcephysics.cabrillo.tracker.PointShapeFootprint
org.opensourcephysics.cabrillo.tracker.PositionVectorFootprint
A PositionVectorFootprint returns a vector shape for a Point[] of length 2,
but creates a hit shape only at the tip of the vector.
-
Field Summary
Fields inherited from class org.opensourcephysics.cabrillo.tracker.PointShapeFootprint
baseStroke, color, footprints, highlight, highlightStroke, hitShapes, name, shape, stroke, transform
-
Constructor Summary
ConstructorsConstructorDescriptionPositionVectorFootprint
(String name, int w) Constructs a PositionVectorFootprint. -
Method Summary
Modifier and TypeMethodDescriptiongetIcon
(int w, int h) Gets the icon.org.opensourcephysics.cabrillo.tracker.MultiShape
Gets the fill shape for a specified point.Gets the stroke.void
setStroke
(BasicStroke stroke) Sets the stroke.Methods inherited from class org.opensourcephysics.cabrillo.tracker.PointShapeFootprint
getColor, getDisplayName, getFootprint, getHitShapes, getLength, getMark, getName, setColor, setShape
-
Constructor Details
-
PositionVectorFootprint
Constructs a PositionVectorFootprint.- Parameters:
name
- the name of the footprintw
- the stroke line width
-
-
Method Details
-
getShape
Gets the fill shape for a specified point.- Specified by:
getShape
in interfaceFootprint
- Overrides:
getShape
in classPointShapeFootprint
- Parameters:
points
- an array of pointsscale
- an integer magnification- Returns:
- the fill shape
-
getIcon
Gets the icon.- Specified by:
getIcon
in interfaceFootprint
- Overrides:
getIcon
in classPointShapeFootprint
- Parameters:
w
- width of the iconh
- height of the icon- Returns:
- the icon
-
setStroke
Sets the stroke. May be set to null.- Specified by:
setStroke
in interfaceFootprint
- Overrides:
setStroke
in classPointShapeFootprint
- Parameters:
stroke
- the desired stroke
-
getStroke
Gets the stroke. May return null;- Specified by:
getStroke
in interfaceFootprint
- Overrides:
getStroke
in classPointShapeFootprint
- Returns:
- the stroke
-