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 BasicStroke
protected double
protected int
protected BasicStroke
protected int
Fields 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.MultiShape
Gets the shape of this footprint.double
Gets the stretch.void
setSolidHead
(boolean solid) Sets the solid arrowhead property.void
setStretch
(double stretch) Sets the stretch.void
setStroke
(BasicStroke stroke) Sets the stroke.void
setTipLength
(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:
setStroke
in interfaceFootprint
- Overrides:
setStroke
in classLineFootprint
- Parameters:
stroke
- the desired stroke
-
getIcon
Gets the icon.- Specified by:
getIcon
in interfaceFootprint
- Overrides:
getIcon
in classLineFootprint
- Parameters:
w
- width of the iconh
- height of the icon- Returns:
- the icon
-
getShape
Gets the shape of this footprint.- Specified by:
getShape
in interfaceFootprint
- Overrides:
getShape
in classLineFootprint
- Parameters:
points
- an array of Pointsscale
- an integer magnification- Returns:
- the shape
-