EventObject

public class EventObject extends Object
implements Serializable
Known Direct Subclasses
Known Indirect Subclasses

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 Object source The object on which the Event initially occurred.

Public Constructor Summary

EventObject(Object source)
Constructs a prototypical Event.

Public Method Summary

Object
getSource()
The object on which the Event initially occurred.
String
toString()
Returns a String representation of this EventObject.

Inherited Method Summary

Fields

protected Object source

The object on which the Event initially occurred.

Public Constructors

public EventObject (Object source)

Constructs a prototypical Event.

Parameters
source The object on which the Event initially occurred.
Throws
IllegalArgumentException if source is null.

Public Methods

public Object getSource ()

The object on which the Event initially occurred.

Returns
  • The object on which the Event initially occurred.

public String toString ()

Returns a String representation of this EventObject.

Returns
  • A a String representation of this EventObject.