| java.lang.Object org.jfree.data.general.Series
All known Subclasses: org.jfree.data.time.TimePeriodValues, org.jfree.data.time.TimeSeries, org.jfree.data.xy.XYSeries, org.jfree.data.xy.MatrixSeries, org.jfree.data.ComparableObjectSeries, org.jfree.data.gantt.TaskSeries,
Series | abstract public class Series implements Cloneable,Serializable(Code) | | Base class representing a data series. Subclasses are left to implement the
actual data structures.
The series has two properties ("Key" and "Description") for which you can
register a PropertyChangeListener .
You can also register a
SeriesChangeListener to receive notification
of changes to the series data.
|
Constructor Summary | |
protected | Series(Comparable key) Creates a new series with the specified key. | protected | Series(Comparable key, String description) Creates a new series with the specified key and description. |
Series | protected Series(Comparable key)(Code) | | Creates a new series with the specified key.
Parameters: key - the series key (null not permitted). |
Series | protected Series(Comparable key, String description)(Code) | | Creates a new series with the specified key and description.
Parameters: key - the series key (null NOT permitted). Parameters: description - the series description (null permitted). |
addChangeListener | public void addChangeListener(SeriesChangeListener listener)(Code) | | Registers an object with this series, to receive notification whenever
the series changes.
Objects being registered must implement the
SeriesChangeListener
interface.
Parameters: listener - the listener to register. |
addPropertyChangeListener | public void addPropertyChangeListener(PropertyChangeListener listener)(Code) | | Adds a property change listener to the series.
Parameters: listener - the listener. |
clone | public Object clone() throws CloneNotSupportedException(Code) | | Returns a clone of the series.
Notes:
- No need to clone the name or description, since String object is
immutable.
- We set the listener list to empty, since the listeners did not
register with the clone.
- Same applies to the PropertyChangeSupport instance.
A clone of the series. throws: CloneNotSupportedException - not thrown by this class, but subclasses may differ. |
equals | public boolean equals(Object obj)(Code) | | Tests the series for equality with another object.
Parameters: obj - the object (null permitted). true or false . |
firePropertyChange | protected void firePropertyChange(String property, Object oldValue, Object newValue)(Code) | | Fires a property change event.
Parameters: property - the property key. Parameters: oldValue - the old value. Parameters: newValue - the new value. |
fireSeriesChanged | public void fireSeriesChanged()(Code) | | General method for signalling to registered listeners that the series
has been changed.
|
getNotify | public boolean getNotify()(Code) | | Returns the flag that controls whether or not change events are sent to
registered listeners.
A boolean. See Also: Series.setNotify(boolean) |
hashCode | public int hashCode()(Code) | | Returns a hash code.
A hash code. |
notifyListeners | protected void notifyListeners(SeriesChangeEvent event)(Code) | | Sends a change event to all registered listeners.
Parameters: event - contains information about the event that triggered the notification. |
removeChangeListener | public void removeChangeListener(SeriesChangeListener listener)(Code) | | Deregisters an object, so that it not longer receives notification
whenever the series changes.
Parameters: listener - the listener to deregister. |
removePropertyChangeListener | public void removePropertyChangeListener(PropertyChangeListener listener)(Code) | | Removes a property change listener from the series.
Parameters: listener - The listener. |
setDescription | public void setDescription(String description)(Code) | | Sets the description of the series and sends a
PropertyChangeEvent to all registered listeners.
Parameters: description - the description (null permitted). See Also: Series.getDescription() |
setKey | public void setKey(Comparable key)(Code) | | Sets the key for the series and sends a PropertyChangeEvent
(with the property name "Key") to all registered listeners.
Parameters: key - the key (null not permitted). See Also: Series.getKey() |
setNotify | public void setNotify(boolean notify)(Code) | | Sets the flag that controls whether or not change events are sent to
registered listeners.
Parameters: notify - the new value of the flag. See Also: Series.getNotify() |
|
|