com.jrefinery.data
Class AbstractDataset

java.lang.Object
  extended by com.jrefinery.data.AbstractDataset
All Implemented Interfaces:
Dataset
Direct Known Subclasses:
AbstractSeriesDataset, DefaultMeterDataset, DefaultPieDataset, DefaultValueDataset, JdbcXYDataset, SiamDataset

public abstract class AbstractDataset
extends java.lang.Object
implements Dataset

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


Field Summary
protected  java.util.List listeners
          Storage for registered change listeners.
 
Constructor Summary
protected AbstractDataset()
          Constructs a dataset.
 
Method Summary
 void addChangeListener(DatasetChangeListener listener)
          Registers an object for notification of changes to the dataset.
protected  void fireDatasetChanged()
          Notifies all registered listeners that the dataset has changed.
protected  void notifyListeners(DatasetChangeEvent event)
          Notifies all registered listeners that the dataset has changed.
 void removeChangeListener(DatasetChangeListener listener)
          Deregisters an object for notification of changes to the dataset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected java.util.List listeners
Storage for registered change listeners.

Constructor Detail

AbstractDataset

protected AbstractDataset()
Constructs a dataset.

Method Detail

addChangeListener

public void addChangeListener(DatasetChangeListener listener)
Registers an object for notification of changes to the dataset.

Specified by:
addChangeListener in interface Dataset
Parameters:
listener - The object to register.

removeChangeListener

public void removeChangeListener(DatasetChangeListener listener)
Deregisters an object for notification of changes to the dataset.

Specified by:
removeChangeListener in interface Dataset
Parameters:
listener - The object to deregister.

fireDatasetChanged

protected void fireDatasetChanged()
Notifies all registered listeners that the dataset has changed.


notifyListeners

protected void notifyListeners(DatasetChangeEvent event)
Notifies all registered listeners that the dataset has changed.

Parameters:
event - Contains information about the event that triggered the notification.


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.