public abstract class Series extends Object implements Cloneable, Serializable
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.
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(SeriesChangeListener listener)
Registers an object with this series, to receive notification whenever
the series changes.
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener to the series.
|
void |
addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable property change listener to the series.
|
Object |
clone()
Returns a clone of the series.
|
boolean |
equals(Object obj)
Tests the series for equality with another object.
|
void |
fireSeriesChanged()
General method for signalling to registered listeners that the series
has been changed.
|
String |
getDescription()
Returns a description of the series.
|
abstract int |
getItemCount()
Returns the number of data items in the series.
|
Comparable |
getKey()
Returns the key for the series.
|
boolean |
getNotify()
Returns the flag that controls whether or not change events are sent to
registered listeners.
|
int |
hashCode()
Returns a hash code.
|
boolean |
isEmpty()
Returns
true if the series contains no data items, and
false otherwise. |
void |
removeChangeListener(SeriesChangeListener listener)
Deregisters an object, so that it not longer receives notification
whenever the series changes.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener from the series.
|
void |
removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable property change listener from the series.
|
void |
setDescription(String description)
Sets the description of the series and sends a
PropertyChangeEvent to all registered listeners. |
void |
setKey(Comparable key)
Sets the key for the series and sends a
VetoableChangeEvent
(with the property name "Key") to all registered listeners. |
void |
setNotify(boolean notify)
Sets the flag that controls whether or not change events are sent to
registered listeners.
|
public Comparable getKey()
null
).setKey(Comparable)
public void setKey(Comparable key)
VetoableChangeEvent
(with the property name "Key") to all registered listeners. For
backwards compatibility, this method also fires a regular
PropertyChangeEvent
. If the key change is vetoed this
method will throw an IllegalArgumentException.key
- the key (null
not permitted).getKey()
public String getDescription()
null
).setDescription(String)
public void setDescription(String description)
PropertyChangeEvent
to all registered listeners.description
- the description (null
permitted).getDescription()
public boolean getNotify()
setNotify(boolean)
public void setNotify(boolean notify)
notify
- the new value of the flag.getNotify()
public boolean isEmpty()
true
if the series contains no data items, and
false
otherwise.public abstract int getItemCount()
public Object clone() throws CloneNotSupportedException
Notes:
clone
in class Object
CloneNotSupportedException
- not thrown by this class, but
subclasses may differ.public boolean equals(Object obj)
public int hashCode()
public void addChangeListener(SeriesChangeListener listener)
Objects being registered must implement the SeriesChangeListener
interface.
listener
- the listener to register.public void removeChangeListener(SeriesChangeListener listener)
listener
- the listener to deregister.public void fireSeriesChanged()
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the listener.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the listener.public void addVetoableChangeListener(VetoableChangeListener listener)
listener
- the listener.public void removeVetoableChangeListener(VetoableChangeListener listener)
listener
- the listener.Jas4pp 1.5 © Java Analysis Studio for Particle Physics