Drawable, MeasurableTrailSmartpublic class TrailBezier extends AbstractTrail
closed, color, drawingStroke, enableMeasure, numpts, xmax, xmaxLogscale, xmin, xminLogscale, ymax, ymaxLogscale, ymin, yminLogscale| Constructor | Description |
|---|---|
TrailBezier() |
| Modifier and Type | Method | 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 trail by connecting the first point to the last point.
|
void |
draw(DrawingPanel panel,
java.awt.Graphics g) |
Draw the trail on the panel.
|
protected void |
drawPathEnd(DrawingPanel panel,
java.awt.Graphics2D g2) |
Draws the points that have not yet been added to the spline.
|
static XML.ObjectLoader |
getLoader() |
Returns the XML.ObjectLoader for this class.
|
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 |
setSlack(double slack) |
Sets the slack which determines the position of the control points.
|
getNumberOfPoints, getStroke, getXMaxLogscale, getXMinLogscale, getYMaxLogscale, getYMinLogscale, setDashedStroke, setMeasured, setStrokepublic void addPoint(double x,
double y)
addPoint in class AbstractTrailx - doubley - doublepublic void setSlack(double slack)
slack - doublepublic void closeTrail()
closeTrail in class AbstractTrailpublic void clear()
clear in class AbstractTrailpublic void draw(DrawingPanel panel, java.awt.Graphics g)
g - protected void drawPathEnd(DrawingPanel panel, java.awt.Graphics2D g2)
panel - DrawingPanelg2 - Graphics2Dpublic static XML.ObjectLoader getLoader()
public boolean isMeasured()
isMeasured in interface MeasurableisMeasured in class AbstractTrailpublic double getXMin()
getXMin in interface MeasurablegetXMin in class AbstractTrailpublic double getXMax()
getXMax in interface MeasurablegetXMax in class AbstractTrailpublic double getYMin()
getYMin in interface MeasurablegetYMin in class AbstractTrailpublic double getYMax()
getYMax in interface MeasurablegetYMax in class AbstractTrail