EventListenerList
- class javax.swing.event..EventListenerList public class EventListenerList extends Object implements Serializable Tree:java.lang.Object - javax.swing.event.EventListenerList A class which holds a list of EventListeners. A single instance can be used to hold all listeners (of all types) for the instance using the lsit. It is the responsiblity of the class using the EventListenerList to provide type-safe API (preferably conforming to the JavaBeans spec) and methods which dispatch event notification methods to appropriate Event Listeners on the list. The main benefits which this class provides are that it is relatively cheap in the case of no listeners, and provides serialization for eventlistener lists in a single place, as well as a degree of MT safety (when used correctly). Usage example: Say one is defining a class which sends out FooEvents, and wantds to allow users of the class to register FooListeners and receive notification when FooEvents occur. The following should be added to the class definition: EventListenerList() - Constructor for class javax.swing.event.EventListenerList public EventListenerList () | ||||
Search Dictionary:
