org.opensourcephysics.cabrillo.tracker
Class OutlineFootprint

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

public class OutlineFootprint
extends LineFootprint

An OutlineFootprint returns an outline shape for a Point array of length 2.

Author:
Douglas Brown

Field Summary
 
Fields inherited from class org.opensourcephysics.cabrillo.tracker.LineFootprint
color, DASHED_LINE, DOTTED_LINE, highlight, HIGHLIGHT, hitShapes, line, name, path, stroke, transform
 
Constructor Summary
OutlineFootprint(java.lang.String name)
          Constructs an OutlineFootprint.
 
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.
 int getSpread()
          Gets the spread.
 void setSpread(int spread)
          Sets the spread.
 void setStroke(java.awt.BasicStroke stroke)
          Overrides LineProfile setStroke method.
 
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
 

Constructor Detail

OutlineFootprint

public OutlineFootprint(java.lang.String name)
Constructs an OutlineFootprint.

Parameters:
name - the name of the footprint
Method Detail

setSpread

public void setSpread(int spread)
Sets the spread. The width of the outline is (1 + 2*spread).

Parameters:
spread - the desired spread

getSpread

public int getSpread()
Gets the spread.

Returns:
the spread

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

setStroke

public void setStroke(java.awt.BasicStroke stroke)
Overrides LineProfile setStroke method.

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

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