public class ScatterPlotDataSet extends Object implements IScatterPlotDataSet, HTMLTestable
| Modifier and Type | Field and Description |
|---|---|
private ArrayList |
data |
private ArrayList |
legendLabels |
private int |
numDataItems |
private ArrayList |
paints |
private static Point2D.Double |
POINT |
private ScatterPlotProperties |
scatterPlotProperties |
| Constructor and Description |
|---|
ScatterPlotDataSet(ScatterPlotProperties scatterPlotProperties)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDataPoints(Point2D.Double[] points,
Paint paint,
String legendLabel) |
static Point2D.Double |
createPoint2DDouble()
Take advantage of the face Cloning performs better than creating new for highly used
Objects.
|
ChartType |
getChartType()
Returns the type constant that this data set should be plotted as.
|
ChartTypeProperties |
getChartTypeProperties()
Returns ChartTypeProperties Object for the data set which will be typed into the specific
chart type class.
|
String |
getLegendLabel(int index)
Returns the legend label for the passed index.
|
int |
getNumberOfDataItems()
Returns the number of elements in the data set.
|
int |
getNumberOfDataSets()
Returns the number of elements in the data set.
|
int |
getNumberOfLegendLabels()
Returns the number of Legend Labels to display.
|
Paint |
getPaint(int index)
Returns the legend label for the passed index.
|
Point2D.Double |
getValue(int dataset,
int index)
Returns the value in the data set at the specified position.
|
void |
toHTML(HTMLGenerator htmlGenerator)
Enables the testing routines to display the contents of this Object.
|
void |
validate()
Performs a limited validation of data.
|
private static Point2D.Double POINT
private ArrayList data
private ArrayList legendLabels
private ArrayList paints
private ScatterPlotProperties scatterPlotProperties
private int numDataItems
public ScatterPlotDataSet(ScatterPlotProperties scatterPlotProperties)
scatterPlotProperties - public final ChartType getChartType()
getChartType in interface IAxisPlotDataSetChartTypepublic void addDataPoints(Point2D.Double[] points, Paint paint, String legendLabel)
points - paint - legendLabel - public void validate()
throws ChartDataException
validate in interface IAxisPlotDataSetChartDataExceptionpublic Point2D.Double getValue(int dataset, int index)
getValue in interface IScatterPlotDataSetdataset - index - public final String getLegendLabel(int index)
getLegendLabel in interface IDataSetindex - public int getNumberOfLegendLabels()
getNumberOfLegendLabels in interface IDataSetpublic Paint getPaint(int index)
public ChartTypeProperties getChartTypeProperties()
IDataSetgetChartTypeProperties in interface IDataSetpublic int getNumberOfDataSets()
getNumberOfDataSets in interface IAxisPlotDataSetpublic int getNumberOfDataItems()
getNumberOfDataItems in interface IDataSetpublic static final Point2D.Double createPoint2DDouble()
public void toHTML(HTMLGenerator htmlGenerator)
toHTML in interface HTMLTestablehtmlGenerator -