public class SampleXYDataset
extends org.jfree.data.xy.AbstractXYDataset
implements org.jfree.data.xy.XYDataset
Note that the aim of this class is to create a self-contained data source for demo purposes - it is NOT intended to show how you should go about writing your own datasets.
| Constructor and Description |
|---|
SampleXYDataset()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getItemCount(int series)
Returns the number of items in the specified series.
|
int |
getSeriesCount()
Returns the number of series in the dataset.
|
java.lang.Comparable |
getSeriesKey(int series)
Returns the key for a series.
|
double |
getTranslate()
Returns the translation factor.
|
java.lang.Number |
getX(int series,
int item)
Returns the x-value for the specified series and item.
|
java.lang.Number |
getY(int series,
int item)
Returns the y-value for the specified series and item.
|
void |
setTranslate(double translate)
Sets the translation constant for the x-axis.
|
getDomainOrder, getXValue, getYValueaddChangeListener, clone, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObjectpublic double getTranslate()
public void setTranslate(double translate)
translate - the translation factor.public java.lang.Number getX(int series,
int item)
getX in interface org.jfree.data.xy.XYDatasetseries - the index (zero-based) of the series.item - the index (zero-based) of the required item.public java.lang.Number getY(int series,
int item)
getY in interface org.jfree.data.xy.XYDatasetseries - the index (zero-based) of the series.item - the index (zero-based) of the required item.public int getSeriesCount()
getSeriesCount in interface org.jfree.data.general.SeriesDatasetgetSeriesCount in class org.jfree.data.general.AbstractSeriesDatasetpublic java.lang.Comparable getSeriesKey(int series)
getSeriesKey in interface org.jfree.data.general.SeriesDatasetgetSeriesKey in class org.jfree.data.general.AbstractSeriesDatasetseries - the index (zero-based) of the series.public int getItemCount(int series)
getItemCount in interface org.jfree.data.xy.XYDatasetseries - the index (zero-based) of the series.