|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.tools.event.EventDispatcher
public class EventDispatcher
Helper object for management and dispatching of events.
Constructor Summary | |
---|---|
EventDispatcher(java.lang.Object pOwner)
|
Method Summary | |
---|---|
void |
addNotificationListener(EventType type,
INotificationListener listener)
Add listener to the collection of objects to be informed
when the receiver triggers an event of type name . |
void |
attach(INotificationSupport support)
|
void |
clear()
|
void |
detach(INotificationSupport support)
|
java.lang.Object |
getOwner()
|
void |
handleEvent(Event event)
Called when an event occurs. |
protected boolean |
hasListener(EventType type,
INotificationListener listener)
|
boolean |
isEmpty()
|
void |
removeNotificationListener(EventType type,
INotificationListener listener)
Remove listener from the collection of objects to be
informed about events of type name . |
void |
triggerEvent(Event event)
|
void |
triggerEventReverse(Event event)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventDispatcher(java.lang.Object pOwner)
Method Detail |
---|
public void addNotificationListener(EventType type, INotificationListener listener)
INotificationSupport
listener
to the collection of objects to be informed
when the receiver triggers an event of type name
.
addNotificationListener
in interface INotificationSupport
type
- The event type we are interested in.listener
- The object to be informed about an event occurrencepublic void attach(INotificationSupport support)
public void clear()
public void detach(INotificationSupport support)
public java.lang.Object getOwner()
public void handleEvent(Event event)
INotificationListener
handleEvent
in interface INotificationListener
event
- The event object giving detail information about the context.protected boolean hasListener(EventType type, INotificationListener listener)
public boolean isEmpty()
public void removeNotificationListener(EventType type, INotificationListener listener)
INotificationSupport
listener
from the collection of objects to be
informed about events of type name
.
removeNotificationListener
in interface INotificationSupport
type
- The event type we are no longer interested in.listener
- The object registered for the event till now.public void triggerEvent(Event event)
public void triggerEventReverse(Event event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |