Class ArrowFootprint
java.lang.Object
org.opensourcephysics.cabrillo.tracker.LineFootprint
org.opensourcephysics.cabrillo.tracker.ArrowFootprint
An ArrowFootprint returns an arrow shape for a Point array of length 2.
- Author:
- Douglas Brown
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BasicStrokeprotected doubleprotected intprotected BasicStrokeprotected intFields inherited from class org.opensourcephysics.cabrillo.tracker.LineFootprint
baseStroke, color, DASHED_LINE, DOTTED_LINE, highlight, hitLine, hitShapes, line, name, path, rotatorStroke, stroke, transform, WIDE_DOTTED_LINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIcon(int w, int h) Gets the icon.org.opensourcephysics.cabrillo.tracker.MultiShapeGets the shape of this footprint.doubleGets the stretch.voidsetSolidHead(boolean solid) Sets the solid arrowhead property.voidsetStretch(double stretch) Sets the stretch.voidsetStroke(BasicStroke stroke) Sets the stroke.voidsetTipLength(int tipLength) Sets the length of the arrow tip.Methods inherited from class org.opensourcephysics.cabrillo.tracker.LineFootprint
checkStrokes, getColor, getDisplayName, getFootprint, getFootprint, getHighlightShape, getHitShapes, getLength, getMark, getName, getRotatorShape, getStroke, setColor, setDashArray, setLineWidth
-
Field Details
-
stretch
protected double stretch -
tipLength
protected int tipLength -
tipWidth
protected int tipWidth -
headStroke
-
tipStroke
-
-
Constructor Details
-
ArrowFootprint
Constructs an ArrowFootprint.- Parameters:
name- the name
-
-
Method Details
-
setStretch
public void setStretch(double stretch) Sets the stretch. The length of the arrow is stretched by this factor.- Parameters:
stretch- the desired stretch
-
getStretch
public double getStretch()Gets the stretch.- Returns:
- the stretch
-
setTipLength
public void setTipLength(int tipLength) Sets the length of the arrow tip.- Parameters:
tipLength- the desired tip length in pixels
-
setSolidHead
public void setSolidHead(boolean solid) Sets the solid arrowhead property.- Parameters:
solid- true for a filled arrowhead
-
setStroke
Sets the stroke.- Specified by:
setStrokein interfaceFootprint- Overrides:
setStrokein classLineFootprint- Parameters:
stroke- the desired stroke
-
getIcon
Gets the icon.- Specified by:
getIconin interfaceFootprint- Overrides:
getIconin classLineFootprint- Parameters:
w- width of the iconh- height of the icon- Returns:
- the icon
-
getShape
Gets the shape of this footprint.- Specified by:
getShapein interfaceFootprint- Overrides:
getShapein classLineFootprint- Parameters:
points- an array of Pointsscale- an integer magnification- Returns:
- the shape
-