java.util
Class EventObject

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent , BeanContextEvent sample code for java.beans.beancontext.BeanContextEvent definition code for java.beans.beancontext.BeanContextEvent , CaretEvent sample code for javax.swing.event.CaretEvent definition code for javax.swing.event.CaretEvent , ChangeEvent sample code for javax.swing.event.ChangeEvent definition code for javax.swing.event.ChangeEvent , ConnectionEvent sample code for javax.sql.ConnectionEvent definition code for javax.sql.ConnectionEvent , DragGestureEvent sample code for java.awt.dnd.DragGestureEvent definition code for java.awt.dnd.DragGestureEvent , DragSourceEvent sample code for java.awt.dnd.DragSourceEvent definition code for java.awt.dnd.DragSourceEvent , DropTargetEvent sample code for java.awt.dnd.DropTargetEvent definition code for java.awt.dnd.DropTargetEvent , FlavorEvent sample code for java.awt.datatransfer.FlavorEvent definition code for java.awt.datatransfer.FlavorEvent , HyperlinkEvent sample code for javax.swing.event.HyperlinkEvent definition code for javax.swing.event.HyperlinkEvent , LineEvent sample code for javax.sound.sampled.LineEvent definition code for javax.sound.sampled.LineEvent , ListDataEvent sample code for javax.swing.event.ListDataEvent definition code for javax.swing.event.ListDataEvent , ListSelectionEvent sample code for javax.swing.event.ListSelectionEvent definition code for javax.swing.event.ListSelectionEvent , MenuEvent sample code for javax.swing.event.MenuEvent definition code for javax.swing.event.MenuEvent , NamingEvent sample code for javax.naming.event.NamingEvent definition code for javax.naming.event.NamingEvent , NamingExceptionEvent sample code for javax.naming.event.NamingExceptionEvent definition code for javax.naming.event.NamingExceptionEvent , NodeChangeEvent sample code for java.util.prefs.NodeChangeEvent definition code for java.util.prefs.NodeChangeEvent , Notification sample code for javax.management.Notification definition code for javax.management.Notification , PopupMenuEvent sample code for javax.swing.event.PopupMenuEvent definition code for javax.swing.event.PopupMenuEvent , PreferenceChangeEvent sample code for java.util.prefs.PreferenceChangeEvent definition code for java.util.prefs.PreferenceChangeEvent , PrintEvent sample code for javax.print.event.PrintEvent definition code for javax.print.event.PrintEvent , PropertyChangeEvent sample code for java.beans.PropertyChangeEvent definition code for java.beans.PropertyChangeEvent , RowSetEvent sample code for javax.sql.RowSetEvent definition code for javax.sql.RowSetEvent , TableColumnModelEvent sample code for javax.swing.event.TableColumnModelEvent definition code for javax.swing.event.TableColumnModelEvent , TableModelEvent sample code for javax.swing.event.TableModelEvent definition code for javax.swing.event.TableModelEvent , TreeExpansionEvent sample code for javax.swing.event.TreeExpansionEvent definition code for javax.swing.event.TreeExpansionEvent , TreeModelEvent sample code for javax.swing.event.TreeModelEvent definition code for javax.swing.event.TreeModelEvent , TreeSelectionEvent sample code for javax.swing.event.TreeSelectionEvent definition code for javax.swing.event.TreeSelectionEvent , UndoableEditEvent sample code for javax.swing.event.UndoableEditEvent definition code for javax.swing.event.UndoableEditEvent , UnsolicitedNotificationEvent sample code for javax.naming.ldap.UnsolicitedNotificationEvent definition code for javax.naming.ldap.UnsolicitedNotificationEvent

public class EventObject
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

The root class from which all event state objects shall be derived.

All Events are constructed with a reference to the object, the "source", that is logically deemed to be the object upon which the Event in question initially occurred upon.

Since:
JDK1.1
See Also:
Serialized Form

Field Summary
protected  Object sample code for java.lang.Object definition code for java.lang.Object source sample code for java.util.EventObject.source definition code for java.util.EventObject.source
          The object on which the Event initially occurred.
 
Constructor Summary
EventObject sample code for java.util.EventObject.EventObject(java.lang.Object) definition code for java.util.EventObject.EventObject(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  source)
          Constructs a prototypical Event.
 
Method Summary
 Object sample code for java.lang.Object definition code for java.lang.Object getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource() ()
          The object on which the Event initially occurred.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for java.util.EventObject.toString() definition code for java.util.EventObject.toString() ()
          Returns a String representation of this EventObject.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

source sample code for java.util.EventObject.source

protected transient Object sample code for java.lang.Object definition code for java.lang.Object  source
The object on which the Event initially occurred.

Constructor Detail

EventObject sample code for java.util.EventObject(java.lang.Object) definition code for java.util.EventObject(java.lang.Object)

public EventObject(Object sample code for java.lang.Object definition code for java.lang.Object  source)
Constructs a prototypical Event.

Parameters:
source - The object on which the Event initially occurred.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if source is null.
Method Detail

getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource()

public Object sample code for java.lang.Object definition code for java.lang.Object  getSource()
The object on which the Event initially occurred.

Returns:
The object on which the Event initially occurred.

toString sample code for java.util.EventObject.toString() definition code for java.util.EventObject.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a String representation of this EventObject.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
A a String representation of this EventObject.