public class Trail extends AbstractTrail
closed, color, drawingStroke, enableMeasure, numpts, xmax, xmin, ymax, ymin
Constructor and Description |
---|
Trail() |
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double x,
double y)
Adds a point to the trail.
|
void |
clear()
Clears all points from the trail.
|
void |
closeTrail()
Closes the path by connecting the first point to the last point.
|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the trail on the panel.
|
static XML.ObjectLoader |
getLoader()
Returns the XML.ObjectLoader for this class.
|
boolean |
isConnected()
Gets the connected flag.
|
void |
moveToPoint(double x,
double y)
Starts a new trail segment by moving to a new point without drawing.
|
void |
setConnected(boolean connected)
Sets the connectd flag.
|
getNumberOfPoints, getStroke, getXMax, getXMin, getYMax, getYMin, isMeasured, setDashedStroke, setMeasured, setStroke
public void addPoint(double x, double y)
addPoint
in class AbstractTrail
x
- doubley
- doublepublic void moveToPoint(double x, double y)
x
- doubley
- doublepublic void closeTrail()
closeTrail
in class AbstractTrail
public void setConnected(boolean connected)
connected
- booleanpublic boolean isConnected()
connected
- booleanpublic void clear()
clear
in class AbstractTrail
public void draw(DrawingPanel panel, java.awt.Graphics g)
g
- public static XML.ObjectLoader getLoader()