|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.javax.util.EventManager
An EventManager
manages event listener lists
for one or more types of events.
Intended for use as the superclass for implementations
of event source objects which trigger one or more events.
Subclasses are responsible for implementing event firing logic
to trigger their supported events. Subclasses should also
implement type-specific listener registration add and remove operations
for specific event types which conform to the conventional pattern
of addFooListener(FooListener)
and
removeFooListener(FooListener)
for an event type Foo.
The event type with which a listener list is associated
is ordinarily the Class
of the event listener
interface type.
This class was inspired by mechanisms in the Visual Smalltalk event system.
EventListenerList
Constructor Summary | |
EventManager()
Construct a new EventManager . |
Method Summary | |
void |
addFirstListener(java.util.EventListener aListener,
java.lang.Object eventType)
Add an event listener to the start of the list of listeners registered for the specified event. |
void |
addListener(java.util.EventListener aListener,
java.lang.Object eventType)
Add an event listener to the end of the list of listeners registered for the specified event. |
java.util.Map |
getEventTable()
Answer the event table which maps listener types to their listener lists. |
java.util.Map |
getEventTableForEdit()
Answer the event table which maps listener types to their listener lists. |
java.util.EventListener[] |
getListeners(java.lang.Object eventType)
Answer the listeners for the specified type of event. |
void |
removeListener(java.util.EventListener aListener,
java.lang.Object eventType)
Remove an event listener from the list of listeners registered for the specified event. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EventManager()
EventManager
.
Method Detail |
public void addFirstListener(java.util.EventListener aListener, java.lang.Object eventType)
aListener
- the listener to be addedeventType
- the event type (usually an EventListener interface type)public void addListener(java.util.EventListener aListener, java.lang.Object eventType)
aListener
- the listener to be addedeventType
- the event type (usually an EventListener interface type)public java.util.Map getEventTable()
This service is intended for use by subclasses. It should not ordinarily be used by external clients.
public java.util.Map getEventTableForEdit()
This service is intended for use by subclasses. It should not ordinarily be used by external clients.
public java.util.EventListener[] getListeners(java.lang.Object eventType)
eventType
- the event type (usually an EventListener interface type)public void removeListener(java.util.EventListener aListener, java.lang.Object eventType)
aListener
- the listener to be addedeventType
- the event type (usually an EventListener interface type)
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |