net.sourceforge.xwing
Class AbstractSourceSink
java.lang.Object
net.sourceforge.xwing.AbstractSourceSink
- All Implemented Interfaces:
- SourceSink
- Direct Known Subclasses:
- CachingSourceSink, DefaultValueSourceSink, FilteringSourceSink, MapSourceSink, NodeSourceSink, NullSourceSink, PrefSourceSink, SimpleSourceSink, WeakSourceSink
- public abstract class AbstractSourceSink
- extends Object
- implements SourceSink
A partial implementation of SourceSink that takes care of managing
the list of listeners. Derived classes must still implement
get() and set().
- Version:
- $Revision: 1.2 $
- Author:
- Scott Howlett
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSourceSink
public AbstractSourceSink()
addChangeListener
public void addChangeListener(ChangeListener l)
- Description copied from interface:
SourceSink
- Add the specified listener to the list of interested change
listeners. In general, whenever our value changes (either
a new value is set via the set() method or the existing
value's internal state changes), all subscribed listeners
are notified with a ChangeEvent.
- Specified by:
addChangeListener
in interface SourceSink
- Parameters:
l
- The listener to add.
removeChangeListener
public void removeChangeListener(ChangeListener l)
- Description copied from interface:
SourceSink
- Remove the specified listener from the list of interested
change listeners.
- Specified by:
removeChangeListener
in interface SourceSink
- Parameters:
l
- The listener to remove.
fireStateChanged
protected void fireStateChanged()
- Calls the stateChanged method of all registered listeners.
Derived classes should call this method whenever they
change the internal state.
Copyright © 2003 The Xwing Project. All Rights Reserved.