Package org.jfree.chart.demo
Class SimpleIntervalXYDataset
java.lang.Object
org.jfree.data.AbstractDataset
org.jfree.data.AbstractSeriesDataset
org.jfree.data.AbstractXYDataset
org.jfree.data.AbstractIntervalXYDataset
org.jfree.chart.demo.SimpleIntervalXYDataset
- All Implemented Interfaces:
ObjectInputValidation
,Serializable
,Cloneable
,EventListener
,Dataset
,IntervalXYDataset
,SeriesChangeListener
,SeriesDataset
,XYDataset
public class SimpleIntervalXYDataset extends AbstractIntervalXYDataset implements IntervalXYDataset
A quick and dirty sample dataset.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description SimpleIntervalXYDataset()
Creates a new dataset. -
Method Summary
Modifier and Type Method Description void
addChangeListener(DatasetChangeListener listener)
Registers an object for notification of changes to the dataset.Number
getEndXValue(int series, int item)
Returns the ending X value for the specified series and item.Number
getEndYValue(int series, int item)
Returns the ending Y value for the specified series and item.int
getItemCount(int series)
Returns the number of items in a series.int
getSeriesCount()
Returns the number of series in the dataset.String
getSeriesName(int series)
Returns the name of a series.Number
getStartXValue(int series, int item)
Returns the starting X value for the specified series and item.Number
getStartYValue(int series, int item)
Returns the starting Y value for the specified series and item.Number
getXValue(int series, int item)
Returns the x-value for an item within a series.Number
getYValue(int series, int item)
Returns the y-value for an item within a series.void
removeChangeListener(DatasetChangeListener listener)
Deregisters an object for notification of changes to the dataset.Methods inherited from class org.jfree.data.AbstractIntervalXYDataset
getEndX, getEndY, getStartX, getStartY
Methods inherited from class org.jfree.data.AbstractXYDataset
getX, getY
Methods inherited from class org.jfree.data.AbstractSeriesDataset
seriesChanged
Methods inherited from class org.jfree.data.AbstractDataset
clone, getGroup, setGroup, validateObject
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.data.IntervalXYDataset
getEndX, getEndY, getStartX, getStartY
-
Constructor Details
-
SimpleIntervalXYDataset
public SimpleIntervalXYDataset()Creates a new dataset.
-
-
Method Details
-
getSeriesCount
public int getSeriesCount()Returns the number of series in the dataset.- Specified by:
getSeriesCount
in interfaceSeriesDataset
- Specified by:
getSeriesCount
in classAbstractSeriesDataset
- Returns:
- the number of series in the dataset.
-
getSeriesName
Returns the name of a series.- Specified by:
getSeriesName
in interfaceSeriesDataset
- Specified by:
getSeriesName
in classAbstractSeriesDataset
- Parameters:
series
- the series (zero-based index).- Returns:
- the series name.
-
getItemCount
public int getItemCount(int series)Returns the number of items in a series.- Specified by:
getItemCount
in interfaceXYDataset
- Parameters:
series
- the series (zero-based index).- Returns:
- the number of items within a series.
-
getXValue
Returns the x-value for an item within a series.The implementation is responsible for ensuring that the x-values are presented in ascending order.
-
getYValue
Returns the y-value for an item within a series. -
getStartXValue
Returns the starting X value for the specified series and item.- Specified by:
getStartXValue
in interfaceIntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item within a series (zero-based index).- Returns:
- the start x value.
-
getEndXValue
Returns the ending X value for the specified series and item.- Specified by:
getEndXValue
in interfaceIntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item within a series (zero-based index).- Returns:
- the end x value.
-
getStartYValue
Returns the starting Y value for the specified series and item.- Specified by:
getStartYValue
in interfaceIntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item within a series (zero-based index).- Returns:
- the start y value.
-
getEndYValue
Returns the ending Y value for the specified series and item.- Specified by:
getEndYValue
in interfaceIntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item within a series (zero-based index).- Returns:
- the end y value.
-
addChangeListener
Registers an object for notification of changes to the dataset.- Specified by:
addChangeListener
in interfaceDataset
- Overrides:
addChangeListener
in classAbstractDataset
- Parameters:
listener
- the object to register.
-
removeChangeListener
Deregisters an object for notification of changes to the dataset.- Specified by:
removeChangeListener
in interfaceDataset
- Overrides:
removeChangeListener
in classAbstractDataset
- Parameters:
listener
- the object to deregister.
-