|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.AbstractTrail
public abstract class AbstractTrail
AbstractTrail defines a trail of pixels on the screen. This object is often used to show the path of a moving object.
Field Summary | |
---|---|
protected boolean |
closed
|
java.awt.Color |
color
|
protected java.awt.Stroke |
drawingStroke
|
protected boolean |
enableMeasure
|
protected int |
numpts
|
protected double |
xmax
|
protected double |
xmaxLogscale
|
protected double |
xmin
|
protected double |
xminLogscale
|
protected double |
ymax
|
protected double |
ymaxLogscale
|
protected double |
ymin
|
protected double |
yminLogscale
|
Constructor Summary | |
---|---|
AbstractTrail()
|
Method Summary | |
---|---|
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 |
getXMaxLogscale()
Gets the maximum x needed to draw this object on a log scale. |
double |
getXMin()
Gets the minimum x value in the trail. |
double |
getXMinLogscale()
Gets the minimum x needed to draw this object on a log scale. |
double |
getYMax()
Gets the maximum y value in the trail. |
double |
getYMaxLogscale()
Gets the maximum y needed to draw this object on a log scale on a log scale. |
double |
getYMin()
Gets the minimum y value in the trail. |
double |
getYMinLogscale()
Gets the minimum y needed to draw this object on a log scale. |
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. |
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.Drawable |
---|
draw |
Field Detail |
---|
public java.awt.Color color
protected boolean enableMeasure
protected double xmin
protected double xmax
protected double ymin
protected double ymax
protected double xmaxLogscale
protected double ymaxLogscale
protected double xminLogscale
protected double yminLogscale
protected int numpts
protected boolean closed
protected java.awt.Stroke drawingStroke
Constructor Detail |
---|
public AbstractTrail()
Method Detail |
---|
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
public double getXMinLogscale()
public double getXMaxLogscale()
public double getYMinLogscale()
public double getYMaxLogscale()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |