public abstract class AbstractTrail extends java.lang.Object implements Drawable, Measurable
Modifier and Type | Field and Description |
---|---|
protected boolean |
closed |
java.awt.Color |
color |
protected java.awt.Stroke |
drawingStroke |
protected boolean |
enableMeasure |
protected int |
numpts |
protected double |
xmax |
protected double |
xmin |
protected double |
ymax |
protected double |
ymin |
Constructor and Description |
---|
AbstractTrail() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addPoint(double x,
double y)
Adds a point to the trail.
|
abstract void |
clear()
Clears all points from the trail.
|
abstract void |
closeTrail()
Closes the path by connecting the first point to the last point.
|
int |
getNumberOfPoints()
Gets the number of points stored in the trail.
|
java.awt.Stroke |
getStroke()
Gets the drawing stroke.
|
double |
getXMax()
Gets the maximum x value in the trail.
|
double |
getXMin()
Gets the minimum x value in the trail.
|
double |
getYMax()
Gets the maximum y value in the trail.
|
double |
getYMin()
Gets the minimum y value in the trail.
|
boolean |
isMeasured()
Determines if this trail scales the drawing panel.
|
void |
setDashedStroke(int dashPoint,
int dashLength)
Sets the the dash line stroke.
|
void |
setMeasured(boolean _enableMeasure)
Enables the measured flag so that this circle effects the scale of a drawing panel.
|
void |
setStroke(java.awt.Stroke stroke)
Sets the drawing stroke.
|
public java.awt.Color color
protected boolean enableMeasure
protected double xmin
protected double xmax
protected double ymin
protected double ymax
protected int numpts
protected boolean closed
protected java.awt.Stroke drawingStroke
public abstract void addPoint(double x, double y)
x
- doubley
- doublepublic abstract void closeTrail()
public abstract void clear()
public void setStroke(java.awt.Stroke stroke)
stroke
- Strokepublic void setDashedStroke(int dashPoint, int dashLength)
int
- dashPointint
- dashLengthpublic java.awt.Stroke getStroke()
public int getNumberOfPoints()
public void setMeasured(boolean _enableMeasure)
public boolean isMeasured()
isMeasured
in interface Measurable
public double getXMin()
getXMin
in interface Measurable
public double getXMax()
getXMax
in interface Measurable
public double getYMin()
getYMin
in interface Measurable
public double getYMax()
getYMax
in interface Measurable