public abstract class IlvAbstractEventDispatcher extends Object implements IlvEventDispatcher
IlvAbstractEventDispatcher
is the abstract superclass of all
IlvEventDispatcher
implementations that are backed by
collections of event listeners.Modifier and Type | Field and Description |
---|---|
protected IlvEventListenerCollection |
listeners
The collection of event listeners.
|
Constructor and Description |
---|
IlvAbstractEventDispatcher()
Constructs a new event dispatcher.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(GenericEventListener listener)
Adds the specified
listener so that it will receive all events
published by this dispatcher. |
protected abstract IlvEventListenerCollection |
createListeners()
Creates and returns a new collection of event listeners.
|
void |
publish(EventObject event)
Publishes an event to all registered listeners.
|
void |
removeListener(GenericEventListener listener)
Removes the specified
listener so that it no longer receives
any events published by this dispatcher. |
protected IlvEventListenerCollection listeners
public IlvAbstractEventDispatcher()
protected abstract IlvEventListenerCollection createListeners()
public void addListener(GenericEventListener listener)
listener
so that it will receive all events
published by this dispatcher.addListener
in interface IlvEventDispatcher
listener
- The listener which will be subscribed to subsequent
GenericEventListener
events.public void removeListener(GenericEventListener listener)
listener
so that it no longer receives
any events published by this dispatcher.removeListener
in interface IlvEventDispatcher
listener
- The listener which will be unsubscribed from receiving
GenericEventListener
events.public void publish(EventObject event)
publish
in interface IlvEventDispatcher
event
- The event.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.