com.jrefinery.data
Class AbstractSeriesDataset

java.lang.Object
  extended by com.jrefinery.data.AbstractDataset
      extended by com.jrefinery.data.AbstractSeriesDataset
All Implemented Interfaces:
Dataset, SeriesChangeListener, SeriesDataset
Direct Known Subclasses:
CombinedDataset, CombinedXYDataset, DefaultCategoryDataset, DefaultHighLowDataset, DefaultIntervalCategoryDataset, DefaultWindDataset, DefaultXYDataset, GanttSeriesCollection, com.jrefinery.chart.demo.SampleXYDataset, 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.


Field Summary
 
Fields inherited from class com.jrefinery.data.AbstractDataset
listeners
 
Constructor Summary
protected AbstractSeriesDataset()
          Constructs a 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, notifyListeners, removeChangeListener
 
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, removeChangeListener
 

Constructor Detail

AbstractSeriesDataset

protected AbstractSeriesDataset()
Constructs a 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).

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.


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.