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.MultiShapeGets the fill shape for a specified point.Gets the stroke.voidsetStroke(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:
getShapein interfaceFootprint- Overrides:
getShapein classPointShapeFootprint- Parameters:
points- an array of pointsscale- an integer magnification- Returns:
- the fill shape
-
getIcon
Gets the icon.- Specified by:
getIconin interfaceFootprint- Overrides:
getIconin 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:
setStrokein interfaceFootprint- Overrides:
setStrokein classPointShapeFootprint- Parameters:
stroke- the desired stroke
-
getStroke
Gets the stroke. May return null;- Specified by:
getStrokein interfaceFootprint- Overrides:
getStrokein classPointShapeFootprint- Returns:
- the stroke
-