ibm.techexplorer.util
Class EventObject

java.lang.Object
  |
  +--ibm.techexplorer.util.EventObject
Direct Known Subclasses:
AWTEvent, InstanceEvent

public class EventObject
extends java.lang.Object

Description

Event objects represent events that are fired by techexplorer instances. For example, a techexplorer instance source fires a ibm.techexplorer.awt.event.KeyEvent event when a key is pressed inside its display region. The KeyEvent is a subclass of AWTEvent, InputEvent and EventObject. KeyEvent provides additional fields and methods to support the extra functionality needed for relaying keyboard information.

techexplorer instances are so called event sources. Java applets are notified of events fired by techexplorer instances by registering listeners that wish to observe particular events. The section describing ibm.techexplorer.awt.AWTEvent event class provides a detailed discussion of event sources, event listeners and event adaptors.

Current Restriction: Although not implemented in version 3.0 of the techexplorer Java API, we expect event listeners to be able to further refine their observation of events to individual fragments of the document. These so called document objects will be delineated by the author and given a name and/or listener class. For example, a Java applet may register to listen to MouseEvents from all singular matricies in a document. For this reason, techexplorer events include a listenerClass and objectName member variable for future use. Currently, these fields are not used and can safely be ignored.

See Also:
AWTEvent, FocusEvent, InputEvent, KeyEvent, MouseEvent, ibm.techexplorer.plugin.InstanceEvent

Field Summary
protected  java.lang.String documentName
          The name of the document that triggered the event.
protected  int id
          The event identifier.
protected  java.lang.String listenerClass
          The category of listeners that will receive notification of this event.
protected  java.lang.String objectName
          The name of the document object that triggered the event.
protected  java.lang.Object source
          The event source.
 
Constructor Summary
EventObject()
          Constructs an EventObject instance.
 
Method Summary
 java.lang.String getDocumentName()
          Retrieve the name of the document that triggered the event.
 int getID()
          Retrieve the event type.
 java.lang.String getListenerClass()
          Retrieve the category of listeners that will receive notification of this event.
 java.lang.String getObjectName()
          Retrieve the document object that triggered the event.
 java.lang.Object getSource()
          Retrieve the event source that fired this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected transient java.lang.Object source
The event source.

id

protected int id
The event identifier.

documentName

protected java.lang.String documentName
The name of the document that triggered the event.

listenerClass

protected java.lang.String listenerClass
The category of listeners that will receive notification of this event.

objectName

protected java.lang.String objectName
The name of the document object that triggered the event.
Constructor Detail

EventObject

public EventObject()
Constructs an EventObject instance.
Method Detail

getSource

public java.lang.Object getSource()
Retrieve the event source that fired this event.
Returns:
The event source Object.

getDocumentName

public java.lang.String getDocumentName()
Retrieve the name of the document that triggered the event.
Returns:
The document name.

getListenerClass

public java.lang.String getListenerClass()
Retrieve the category of listeners that will receive notification of this event.
Returns:
The listener class name.

getObjectName

public java.lang.String getObjectName()
Retrieve the document object that triggered the event.
Returns:
The name of the document object that triggered the event.

getID

public int getID()
Retrieve the event type.
Returns:
The event type.