|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.ProtractorFootprint
public class ProtractorFootprint
A ProtractorFootprint returns a pair of lines that meet at a vertex at one end and have a specified end shape at the other. This requires a Point array of length 3.
| Field Summary | |
|---|---|
protected static int |
arcRadius
|
protected java.awt.Shape |
circle
|
protected java.awt.Color |
color
|
static float[] |
DOTTED_LINE
|
protected java.awt.Shape[] |
hitShapes
|
protected java.lang.String |
name
|
protected int |
radius
|
protected java.awt.BasicStroke |
stroke
|
| Constructor Summary | |
|---|---|
ProtractorFootprint(java.lang.String name,
int r)
Constructs a ProtractorFootprint. |
|
| Method Summary | |
|---|---|
java.awt.Shape |
getArcAdjustShape(java.awt.Point vertex,
java.awt.Point rotator)
Gets an arcAdjust shape. |
java.awt.Shape |
getCircleShape(java.awt.Point p)
Gets a circle shape. |
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 Footprint. |
java.awt.Shape[] |
getHitShapes()
Gets the hit shapes {vertex, end1, end2, line1, line2, rotator}. |
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 for a Point array {vertex, end1, end2}. |
java.awt.BasicStroke |
getStroke()
Gets the stroke. |
void |
setColor(java.awt.Color color)
Sets the color. |
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 |
|---|
public static final float[] DOTTED_LINE
protected static int arcRadius
protected java.lang.String name
protected java.awt.BasicStroke stroke
protected java.awt.Color color
protected java.awt.Shape[] hitShapes
protected java.awt.Shape circle
protected int radius
| Constructor Detail |
|---|
public ProtractorFootprint(java.lang.String name,
int r)
name - the namer - the radius| Method Detail |
|---|
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 setColor(java.awt.Color color)
setColor in interface Footprintcolor - the desired colorpublic java.awt.Color getColor()
getColor in interface Footprintpublic java.awt.Shape getCircleShape(java.awt.Point p)
p - the desired screen point of the circle
public java.awt.Shape getArcAdjustShape(java.awt.Point vertex,
java.awt.Point rotator)
vertex - the screen point of the vertexrotator - the screen point of the rotator
public java.awt.Shape getShape(java.awt.Point[] points)
getShape in interface Footprintpoints - an array of Points
public static Footprint getFootprint(java.lang.String name)
name - the name of the footprint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||