Package org.jfree.chart.demo
Class SimpleIntervalXYDataset2
java.lang.Object
org.jfree.data.AbstractDataset
org.jfree.data.AbstractSeriesDataset
org.jfree.data.AbstractXYDataset
org.jfree.data.AbstractIntervalXYDataset
org.jfree.chart.demo.SimpleIntervalXYDataset2
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,Dataset,IntervalXYDataset,SeriesChangeListener,SeriesDataset,XYDataset
public class SimpleIntervalXYDataset2 extends AbstractIntervalXYDataset implements IntervalXYDataset
A quick and dirty sample dataset.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description SimpleIntervalXYDataset2(int itemCount)Creates a new dataset. -
Method Summary
Modifier and Type Method Description voidaddChangeListener(DatasetChangeListener listener)Registers an object for notification of changes to the dataset.NumbergetEndXValue(int series, int item)Returns the ending X value for the specified series and item.NumbergetEndYValue(int series, int item)Returns the ending Y value for the specified series and item.intgetItemCount(int series)Returns the number of items in a series.intgetSeriesCount()Returns the number of series in the dataset.StringgetSeriesName(int series)Returns the name of a series.NumbergetStartXValue(int series, int item)Returns the starting X value for the specified series and item.NumbergetStartYValue(int series, int item)Returns the starting Y value for the specified series and item.NumbergetXValue(int series, int item)Returns the x-value for an item within a series.NumbergetYValue(int series, int item)Returns the y-value for an item within a series.voidremoveChangeListener(DatasetChangeListener listener)Deregisters an object for notification of changes to the dataset.Methods inherited from class org.jfree.data.AbstractIntervalXYDataset
getEndX, getEndY, getStartX, getStartYMethods inherited from class org.jfree.data.AbstractXYDataset
getX, getYMethods inherited from class org.jfree.data.AbstractSeriesDataset
seriesChangedMethods inherited from class org.jfree.data.AbstractDataset
clone, getGroup, setGroup, validateObjectMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.IntervalXYDataset
getEndX, getEndY, getStartX, getStartY
-
Constructor Details
-
SimpleIntervalXYDataset2
public SimpleIntervalXYDataset2(int itemCount)Creates a new dataset.- Parameters:
itemCount- the number of items to generate.
-
-
Method Details
-
getSeriesCount
public int getSeriesCount()Returns the number of series in the dataset.- Specified by:
getSeriesCountin interfaceSeriesDataset- Specified by:
getSeriesCountin classAbstractSeriesDataset- Returns:
- the number of series in the dataset.
-
getSeriesName
Returns the name of a series.- Specified by:
getSeriesNamein interfaceSeriesDataset- Specified by:
getSeriesNamein 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:
getItemCountin 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:
getStartXValuein 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:
getEndXValuein 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:
getStartYValuein 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:
getEndYValuein 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:
addChangeListenerin interfaceDataset- Overrides:
addChangeListenerin classAbstractDataset- Parameters:
listener- the object to register.
-
removeChangeListener
Deregisters an object for notification of changes to the dataset.- Specified by:
removeChangeListenerin interfaceDataset- Overrides:
removeChangeListenerin classAbstractDataset- Parameters:
listener- the object to deregister.
-