|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.EventNotifier<T>
public abstract class EventNotifier<T>
Base class for all component-specific EventNotifiers. This class provides common methods to manage listeners of a specific type. T the type of the listener class to be managed.
| Field Summary | |
|---|---|
protected LinkedList<T> |
_listeners
All T Listeners that are listening to the model. |
protected ReaderWriterLock |
_lock
Provides synchronization primitives for solving the readers/writers problem. |
| Constructor Summary | |
|---|---|
EventNotifier()
|
|
| Method Summary | |
|---|---|
void |
addListener(T listener)
Adds a listener to the notifier. |
void |
removeAllListeners()
Removes all listeners from this notifier. |
void |
removeListener(T listener)
Removes a listener from the notifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final LinkedList<T> _listeners
protected final ReaderWriterLock _lock
| Constructor Detail |
|---|
public EventNotifier()
| Method Detail |
|---|
public void addListener(T listener)
listener - a listener that reacts on eventspublic void removeListener(T listener)
listener - a listener that reacts on eventspublic void removeAllListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||