public class CurveData
extends java.lang.Object
refreshGraphJPanel()
of the FunctionGraphsJPanel
in the program.Constructor and Description |
---|
CurveData()
The data set constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double x,
double y)
Adds a point.
|
void |
clear()
Deletes all points.
|
void |
findMinMax()
Finds min and max values.
|
java.awt.Color |
getColor()
Returns the color of the curve.
|
int |
getLineWidth()
Returns the line width.
|
double |
getMaxX()
Returns the maximal X value.
|
double |
getMaxY()
Returns the maximal Y value.
|
double |
getMinX()
Returns the minimal X value.
|
double |
getMinY()
Returns the minimal Y value.
|
int |
getSize()
Returns number of points.
|
java.awt.BasicStroke |
getStroke()
returns the stroke for drawing.
|
double |
getX(int i)
Returns the x-value for index i.
|
double |
getY(int i)
Returns the y-value for index i.
|
void |
setColor(java.awt.Color color)
Sets the color of the curve.
|
void |
setLineWidth(int lineWidth)
Sets the line width.
|
void |
setPoint(int i,
double x,
double y)
Sets a particular point with the index i.
|
void |
setPoints(double[] x,
double[] y)
Sets the points.
|
void |
setStroke(java.awt.BasicStroke lineStroke)
sets the stroke for drawing.
|
public void setColor(java.awt.Color color)
public java.awt.Color getColor()
public void clear()
public int getSize()
public void setLineWidth(int lineWidth)
public int getLineWidth()
public java.awt.BasicStroke getStroke()
public void setStroke(java.awt.BasicStroke lineStroke)
public void setPoints(double[] x, double[] y)
public void addPoint(double x, double y)
public void findMinMax()
public void setPoint(int i, double x, double y)
public double getX(int i)
public double getY(int i)
public double getMinX()
public double getMaxX()
public double getMinY()
public double getMaxY()