|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.AbstractTrail org.opensourcephysics.display.Trail
public class Trail
Title: Trail Description: A trail of pixels on the screen. This object is often used to show the path of a moving object.
Field Summary |
---|
Fields inherited from class org.opensourcephysics.display.AbstractTrail |
---|
closed, color, drawingStroke, enableMeasure, numpts, xmax, xmaxLogscale, xmin, xminLogscale, ymax, ymaxLogscale, ymin, yminLogscale |
Constructor Summary | |
---|---|
Trail()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.opensourcephysics.display.AbstractTrail |
---|
getNumberOfPoints, getStroke, getXMax, getXMaxLogscale, getXMin, getXMinLogscale, getYMax, getYMaxLogscale, getYMin, getYMinLogscale, isMeasured, setDashedStroke, setMeasured, setStroke |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.LogMeasurable |
---|
getXMaxLogscale, getXMinLogscale, getYMaxLogscale, getYMinLogscale |
Methods inherited from interface org.opensourcephysics.display.Measurable |
---|
getXMax, getXMin, getYMax, getYMin, isMeasured |
Constructor Detail |
---|
public Trail()
Method Detail |
---|
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)
draw
in interface Drawable
g
- public static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |