|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.display.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 | |
java.awt.Color |
color
|
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 |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draw the trail on the panel. |
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 |
isConnected()
Gets the connected flag. |
boolean |
isMeasured()
Determines if this trail scales the drawing panel. |
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. |
void |
setMeasured(boolean _enableMeasure)
Enables the measured flag so that this circle effects the scale of a drawing panel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.awt.Color color
Constructor Detail |
public Trail()
Method Detail |
public void addPoint(double x, double y)
x
- doubley
- doublepublic void moveToPoint(double x, double y)
x
- doubley
- doublepublic void setConnected(boolean connected)
connected
- booleanpublic boolean isConnected()
public void clear()
public void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
g
- panel
- public static XML.ObjectLoader getLoader()
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |