zinger.util
Class EventPropagator
java.lang.Object
|
+--zinger.util.EventPropagator
- All Implemented Interfaces:
- EventHandler, java.util.EventListener
- public class EventPropagator
- extends java.lang.Object
- implements EventHandler
Propagates instances of EventObject
through the chain of instances. Each node on the chain can have a
group of listeners (EventHandler
). The main idea is that listeners in the chain are grouped
into the nodes, whose order specifies the order in which the groups are notified. Because this class
implements the listener interface itself, its instances can be listeners too, therefore a tree can be
created with no additional functionality.
- See Also:
EventObject
,
EventHandler
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
SET_RECYCLER
protected static final ObjectRecycler SET_RECYCLER
eventHandlers
protected java.util.Set eventHandlers
next
protected EventPropagator next
EventPropagator
public EventPropagator()
handleEvent
public void handleEvent(java.util.EventObject ev)
- Specified by:
handleEvent
in interface EventHandler
addHandler
public boolean addHandler(EventHandler handler)
removeHandler
public boolean removeHandler(EventHandler handler)
addNext
public EventPropagator addNext()
newPropagator
protected EventPropagator newPropagator()