|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.LineFootprint
public class LineFootprint
A LineFootprint returns a line shape for a Point array of length 2.
| Field Summary | |
|---|---|
protected java.awt.Color |
color
|
static float[] |
DASHED_LINE
A dashed line pattern |
static float[] |
DOTTED_LINE
A dotted line pattern |
protected java.awt.Shape |
highlight
|
protected static java.awt.Shape |
HIGHLIGHT
|
protected java.awt.Shape[] |
hitShapes
|
protected java.awt.geom.Line2D |
line
|
protected java.lang.String |
name
|
protected java.awt.geom.GeneralPath |
path
|
protected java.awt.BasicStroke |
stroke
|
protected java.awt.geom.AffineTransform |
transform
|
| Constructor Summary | |
|---|---|
LineFootprint(java.lang.String name)
Constructs a LineFootprint. |
|
| Method Summary | |
|---|---|
java.awt.Color |
getColor()
Gets the color. |
java.lang.String |
getDisplayName()
Gets the display name of the footprint. |
static Footprint |
getFootprint(java.lang.String name)
Gets a predefined LineFootprint. |
java.awt.Shape[] |
getHitShapes()
Gets the hit shapes. |
javax.swing.Icon |
getIcon(int w,
int h)
Gets the icon. |
int |
getLength()
Gets the minimum point array length required by this footprint. |
Mark |
getMark(java.awt.Point[] points)
Gets the footprint mark. |
java.lang.String |
getName()
Gets the name of this footprint. |
java.awt.Shape |
getShape(java.awt.Point[] points)
Gets the shape of this footprint. |
java.awt.BasicStroke |
getStroke()
Gets the stroke. |
void |
setColor(java.awt.Color color)
Sets the color. |
void |
setDashArray(float[] dashArray)
Sets the dash array. |
void |
setLineWidth(double w)
Sets the line width. |
void |
setStroke(java.awt.BasicStroke stroke)
Sets the stroke. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected java.awt.Shape highlight
protected java.awt.geom.AffineTransform transform
protected java.awt.BasicStroke stroke
protected java.awt.Color color
protected java.awt.geom.GeneralPath path
protected java.awt.geom.Line2D line
protected java.awt.Shape[] hitShapes
public static final float[] DASHED_LINE
public static final float[] DOTTED_LINE
protected static final java.awt.Shape HIGHLIGHT
| Constructor Detail |
|---|
public LineFootprint(java.lang.String name)
name - the name| Method Detail |
|---|
public static Footprint getFootprint(java.lang.String name)
name - the name of the footprint
public java.lang.String getName()
getName in interface Footprintpublic java.lang.String getDisplayName()
getDisplayName in interface Footprintpublic int getLength()
getLength in interface Footprint
public javax.swing.Icon getIcon(int w,
int h)
getIcon in interface Footprintw - width of the iconh - height of the icon
public Mark getMark(java.awt.Point[] points)
getMark in interface Footprintpoints - a Point array
public java.awt.Shape[] getHitShapes()
getHitShapes in interface Footprintpublic void setStroke(java.awt.BasicStroke stroke)
setStroke in interface Footprintstroke - the desired strokepublic java.awt.BasicStroke getStroke()
getStroke in interface Footprintpublic void setDashArray(float[] dashArray)
dashArray - the desired dash arraypublic void setLineWidth(double w)
w - the desired line widthpublic void setColor(java.awt.Color color)
setColor in interface Footprintcolor - the desired colorpublic java.awt.Color getColor()
getColor in interface Footprintpublic java.awt.Shape getShape(java.awt.Point[] points)
getShape in interface Footprintpoints - an array of Points
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||