public abstract class AbstractDataset extends Object implements Dataset, Cloneable, Serializable, ObjectInputValidation
Dataset
interface, containing a
mechanism for registering change listeners.Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(DatasetChangeListener listener)
Registers an object to receive notification of changes to the dataset.
|
Object |
clone()
Returns a clone of the dataset.
|
DatasetGroup |
getGroup()
Returns the dataset group for the dataset.
|
boolean |
getNotify()
Returns the value of the notify flag.
|
boolean |
hasListener(EventListener listener)
Returns
true if the specified object is registered with
the dataset as a listener. |
void |
removeChangeListener(DatasetChangeListener listener)
Deregisters an object so that it no longer receives notification of
changes to the dataset.
|
void |
setGroup(DatasetGroup group)
Sets the dataset group for the dataset.
|
void |
setNotify(boolean notify)
Sets the notify flag, which controls whether or not the
fireDatasetChanged()
method notifies listeners. |
void |
validateObject()
Validates the object.
|
public DatasetGroup getGroup()
getGroup
in interface Dataset
null
).setGroup(DatasetGroup)
public void setGroup(DatasetGroup group)
setGroup
in interface Dataset
group
- the group (null
not permitted).getGroup()
public boolean getNotify()
true
. If this is false
, calls to the
fireDatasetChanged()
method will NOT trigger a dataset
change event.public void setNotify(boolean notify)
fireDatasetChanged()
method notifies listeners. Setting this flag to true
will
trigger a DatasetChangeEvent
because there may be
queued up changes.notify
- the new flag value.public void addChangeListener(DatasetChangeListener listener)
addChangeListener
in interface Dataset
listener
- the object to register.removeChangeListener(DatasetChangeListener)
public void removeChangeListener(DatasetChangeListener listener)
removeChangeListener
in interface Dataset
listener
- the object to deregister.addChangeListener(DatasetChangeListener)
public boolean hasListener(EventListener listener)
true
if the specified object is registered with
the dataset as a listener. Most applications won't need to call this
method, it exists mainly for use by unit testing code.listener
- the listener.addChangeListener(DatasetChangeListener)
,
removeChangeListener(DatasetChangeListener)
public Object clone() throws CloneNotSupportedException
DatasetChangeListener
references that have been registered with
this dataset.clone
in class Object
CloneNotSupportedException
- if the dataset does not support
cloning.public void validateObject() throws InvalidObjectException
validateObject
in interface ObjectInputValidation
InvalidObjectException
- If the object cannot validate itself.Jas4pp 1.5 © Java Analysis Studio for Particle Physics