June 2000
Intermediate to advanced
192 pages
4h 53m
English
This
class is similar in effect and purpose
to the EventListenerList found in the Swing
package. It serves as a type-safe means of storing several listeners
in a single list. You can attach a listener to this list using the
add( ) method. Notice that you specify the class
type of the listener in addition to the listener itself. This class
type can be used later to filter out a subset of listeners that fit a
particular description.
public classEventListenerListimplements Serializable {// Instance Fieldsprotected transient Object[]listenerList;// ConstructorspublicEventListenerList( )// Instance Methodspublic synchronized voidadd(Classt, EventListenerl) public intgetListenerCount(Classt) public intgetListenerCount( ) public Object;getListenerList( ) public synchronized voidremove(Classt, EventListenerl) public StringtoString( )// Overrides java.lang.Object}
This event describes a change in the current
HelpModel. This could be a change in a specific ID
or a change in the highlighting (represented by
pos0 and pos1).
public classHelpModelEventextends EventObject {// ConstructorspublicHelpModelEvent(Objectsource, intpos0, intpos1) publicHelpModelEvent(Objectsource, Map.IDid, URLurl)// Instance Methodspublic Map.IDgetID( ) public intgetPos0( ) public intgetPos1( ) public URLgetURL( ) }
This listener receives notification when the current ID in a
HelpModel changes. ...