org.opensourcephysics.cabrillo.tracker
Class DoubleCrosshairFootprint

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

public class DoubleCrosshairFootprint
extends LineFootprint

A double crosshair footprint for a Point array of length 2.

Author:
Douglas Brown

Field Summary
protected  java.awt.Shape hitShape
           
protected  int size
           
protected  java.awt.Shape targetShape
           
 
Fields inherited from class org.opensourcephysics.cabrillo.tracker.LineFootprint
color, DASHED_LINE, DOTTED_LINE, highlight, HIGHLIGHT, hitShapes, line, name, path, stroke, transform
 
Constructor Summary
DoubleCrosshairFootprint(java.lang.String name)
          Constructs a DoubleCrosshairFootprint.
 
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 setCrosshairSize(int out, int in)
          /** Sets the size of the crosshair.
 void setStroke(java.awt.BasicStroke stroke)
          Sets the stroke.
 
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

targetShape

protected java.awt.Shape targetShape

size

protected int size

hitShape

protected java.awt.Shape hitShape
Constructor Detail

DoubleCrosshairFootprint

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

Parameters:
name - the name
Method Detail

setCrosshairSize

public void setCrosshairSize(int out,
                             int in)
/** Sets the size of the crosshair.

Parameters:
out - the outside end of the crosshair
in - the inside end of the crosshair

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)
Sets the stroke.

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