|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.LineFootprint
org.opensourcephysics.cabrillo.tracker.ArrowFootprint
public class ArrowFootprint
An ArrowFootprint returns an arrow shape for a Point array of length 2.
| Field Summary | |
|---|---|
protected double |
defaultStretch
|
protected double |
stretch
|
protected int |
tipLength
|
protected int |
tipWidth
|
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.LineFootprint |
|---|
color, DASHED_LINE, defaultWidth, DOTTED_LINE, hitShapes, line, name, path, stroke, transform |
| Constructor Summary | |
|---|---|
ArrowFootprint(java.lang.String name)
Constructs an ArrowFootprint. |
|
ArrowFootprint(java.lang.String name,
double stretch)
Constructs an ArrowFootprint. |
|
| 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. |
double |
getStretch()
Gets the stretch. |
void |
setStretch(double stretch)
Sets the stretch. |
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, setStroke |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double stretch
protected double defaultStretch
protected int tipLength
protected int tipWidth
| Constructor Detail |
|---|
public ArrowFootprint(java.lang.String name)
name - the name
public ArrowFootprint(java.lang.String name,
double stretch)
name - the namestretch - the default stretch| Method Detail |
|---|
public void setStretch(double stretch)
stretch - the desired stretchpublic double getStretch()
public void setTipLength(int tipLength)
tipLength - the desired tip length in pixels
public javax.swing.Icon getIcon(int w,
int h)
getIcon in interface FootprintgetIcon in class LineFootprintw - width of the iconh - height of the icon
public java.awt.Shape getShape(java.awt.Point[] points)
getShape in interface FootprintgetShape in class LineFootprintpoints - an array of Points
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||