Team LiB
Previous Section Next Section

EventObjectjava.util

Java 1.1serializable event

EventObject serves as the superclass for all event objects used by the event model introduced in Java 1.1 for AWT and JavaBeans and also used by Swing in Java 1.2. This class defines a generic type of event; it is extended by the more specific event classes in the java.awt, java.awt.event, java.beans, and javax.swing.event packages. The only common feature shared by all events is a source object, which is the object that, in some way, generated the event. The source object is passed to the EventObject( ) constructor and is returned by the getSource( ) method.

Figure 16-19. java.util.EventObject


public class EventObject implements Serializable {
// Public Constructors
     public EventObject(Object source);  
// Public Instance Methods
     public Object getSource( );  
// Public Methods Overriding Object
     public String toString( );  
// Protected Instance Fields
     protected transient Object source;  
}

Subclasses

java.util.prefs.NodeChangeEvent, java.util.prefs.PreferenceChangeEvent, javax.net.ssl.HandshakeCompletedEvent, javax.net.ssl.SSLSessionBindingEvent

    Team LiB
    Previous Section Next Section