org.opensourcephysics.cabrillo.tracker
Class DoubleArrowFootprint

java.lang.Object
  extended by org.opensourcephysics.cabrillo.tracker.LineFootprint
      extended by org.opensourcephysics.cabrillo.tracker.DoubleArrowFootprint
All Implemented Interfaces:
java.lang.Cloneable, Footprint

public class DoubleArrowFootprint
extends LineFootprint

An DoubleArrowFootprint returns a double arrow shape for a Point array of length 2.

Author:
Douglas Brown

Field Summary
protected  java.awt.BasicStroke headStroke
           
protected  int tipLength
           
protected  int tipWidth
           
 
Fields inherited from class org.opensourcephysics.cabrillo.tracker.LineFootprint
color, DASHED_LINE, DOTTED_LINE, highlight, HIGHLIGHT, hitShapes, line, name, path, stroke, transform
 
Constructor Summary
DoubleArrowFootprint(java.lang.String name)
          Constructs a DoubleArrowFootprint.
 
Method Summary
 javax.swing.Icon getIcon(int w, int h)
          Gets the icon.
 java.awt.Shape getShape(java.awt.Point[] points)
          Gets the shape of this footprint.
 void setSolidHead(boolean solid)
          Sets the solid arrowhead property.
 void setStroke(java.awt.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
getColor, getDisplayName, getFootprint, getHitShapes, getLength, getMark, getName, getStroke, setColor, setDashArray, setLineWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tipLength

protected int tipLength

tipWidth

protected int tipWidth

headStroke

protected java.awt.BasicStroke headStroke
Constructor Detail

DoubleArrowFootprint

public DoubleArrowFootprint(java.lang.String name)
Constructs a DoubleArrowFootprint.

Parameters:
name - the name
Method Detail

getIcon

public javax.swing.Icon getIcon(int w,
                                int h)
Gets the icon.

Specified by:
getIcon in interface Footprint
Overrides:
getIcon in class LineFootprint
Parameters:
w - width of the icon
h - 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

public void setStroke(java.awt.BasicStroke stroke)
Sets the stroke.

Specified by:
setStroke in interface Footprint
Overrides:
setStroke in class LineFootprint
Parameters:
stroke - the desired stroke

setSolidHead

public void setSolidHead(boolean solid)
Sets the solid arrowhead property.

Parameters:
solid - true for a filled arrowhead

getShape

public java.awt.Shape getShape(java.awt.Point[] points)
Gets the shape of this footprint.

Specified by:
getShape in interface Footprint
Overrides:
getShape in class LineFootprint
Parameters:
points - an array of Points
Returns:
the shape