java.util
public class: EventObject [javadoc |
source]
java.lang.Object
java.util.EventObject
All Implemented Interfaces:
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.
Field Summary |
---|
protected transient Object | source | The object on which the Event initially occurred. |
Constructor: |
public EventObject(Object source) {
if (source == null)
throw new IllegalArgumentException("null source");
this.source = source;
}
Constructs a prototypical Event. Parameters:
source - The object on which the Event initially occurred.
Throws:
IllegalArgumentException - if source is null.
- exception:
IllegalArgumentException - if source is null.
|
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from java.util.EventObject Detail: |
public Object getSource() {
return source;
}
The object on which the Event initially occurred. |
public String toString() {
return getClass().getName() + "[source=" + source + "]";
}
Returns a String representation of this EventObject. |