borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.model
java.lang.Object +----borland.jbcl.model.SingletonModelMulticaster
Properties Methods
Implements SingletonModelListener, EventListener
A class that dispatches singleton-model events to multiple listeners. SingletonModelMulticaster maintains an array of listeners. The add(), remove(), and find() methods are used to manage this list.
The hasListeners() method determines whether any objects are listening for singleton-model events. The dispatch() method sends a singleton-model event to all listeners.
SingletonModelMulticaster is not required to synchronize its access of the array of listeners because all changes are made to a copy of the original list.
public final synchronized void add(borland.jbcl.model.SingletonModelListener listener)Adds an object to the array of listeners.
Parameters:
public final void dispatch(borland.jbcl.model.SingletonModelEvent e)Sends a singleton-model event to all listeners. This is a high-speed dispatcher that does not need to be synchronized. If a singleton-model event occurs, it calls the modelContentChanged() method of the singleton-model listeners.
Parameters:
public int find(borland.jbcl.model.SingletonModelListener listener)Searches for the specified listener among the array of listening objects.
Parameters:
public final boolean hasListeners()Determines if there are any listeners for singleton-model events. If the method returns true, one or more listeners are present.
public final synchronized void remove(borland.jbcl.model.SingletonModelListener listener)Removes the specified listening object from the array of listeners for singleton-model events.
Parameters: