Class DoubleArrowFootprint
java.lang.Object
org.opensourcephysics.cabrillo.tracker.LineFootprint
org.opensourcephysics.cabrillo.tracker.DoubleArrowFootprint
An DoubleArrowFootprint returns a double arrow shape for a Point array of
length 2.
- Author:
- Douglas Brown
-
Field Summary
FieldsFields 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.void
setSolidHead
(boolean solid) Sets the solid arrowhead property.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
-
tipLength
protected int tipLength -
tipWidth
protected int tipWidth -
headStroke
-
-
Constructor Details
-
DoubleArrowFootprint
Constructs a DoubleArrowFootprint.- Parameters:
name
- the name
-
-
Method Details
-
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
-
setTipLength
public void setTipLength(int tipLength) Sets the length of the arrow tip.- Parameters:
tipLength
- the desired tip length in pixels
-
setStroke
Sets the stroke.- Specified by:
setStroke
in interfaceFootprint
- Overrides:
setStroke
in classLineFootprint
- Parameters:
stroke
- the desired stroke
-
setSolidHead
public void setSolidHead(boolean solid) Sets the solid arrowhead property.- Parameters:
solid
- true for a filled arrowhead
-
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
-