com.jrefinery.data
Class AbstractSeriesDataset

java.lang.Object
  |
  +--com.jrefinery.data.AbstractDataset
        |
        +--com.jrefinery.data.AbstractSeriesDataset
All Implemented Interfaces:
Dataset, SeriesChangeListener, SeriesDataset
Direct Known Subclasses:
CombinedDataset, DefaultCategoryDataset, DefaultHighLowDataset, DefaultIntervalCategoryDataset, DefaultStatisticalCategoryDataset, DefaultWindDataset, DefaultXYDataset, EmptyXYDataset, GanttSeriesCollection, SampleXYDataset, SampleXYDataset2, SampleXYSymbolicDataset, SampleYSymbolicDataset, SubSeriesDataset, TimeSeriesCollection, XYSeriesCollection

public abstract class AbstractSeriesDataset
extends AbstractDataset
implements SeriesDataset, SeriesChangeListener

An abstract implementation of the Dataset interface, containing a mechanism for registering change listeners.

Author:
DG

Constructor Summary
protected AbstractSeriesDataset()
          Creates a new dataset.
 
Method Summary
 int getLegendItemCount()
          Returns the number of items that should be displayed in the legend.
 java.lang.String[] getLegendItemLabels()
          Returns the legend item labels.
abstract  int getSeriesCount()
          Returns the number of series in the dataset.
abstract  java.lang.String getSeriesName(int series)
          Returns the name of a series.
 void seriesChanged(SeriesChangeEvent event)
          Called when a series belonging to the dataset changes.
 
Methods inherited from class com.jrefinery.data.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jrefinery.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
 

Constructor Detail

AbstractSeriesDataset

protected AbstractSeriesDataset()
Creates a new dataset.
Method Detail

getLegendItemCount

public int getLegendItemCount()
Returns the number of items that should be displayed in the legend.

For series datasets, the legend will contain the name of each series.

Returns:
the number of items that should be displayed in the legend.

getLegendItemLabels

public java.lang.String[] getLegendItemLabels()
Returns the legend item labels.
Returns:
the legend item labels.

getSeriesCount

public abstract int getSeriesCount()
Returns the number of series in the dataset.
Specified by:
getSeriesCount in interface SeriesDataset
Returns:
the number of series in the dataset.

getSeriesName

public abstract java.lang.String getSeriesName(int series)
Returns the name of a series.
Specified by:
getSeriesName in interface SeriesDataset
Parameters:
series - the series (zero-based index).
Returns:
the series name.

seriesChanged

public void seriesChanged(SeriesChangeEvent event)
Called when a series belonging to the dataset changes.
Specified by:
seriesChanged in interface SeriesChangeListener
Parameters:
event - information about the change.