|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.visualize.data.DataModelMonitor
Singleton (global) monitor for data models. All data models are responsible for adding and removing themselves from this monitor. Monitors data model state changes and maps clientIDs to data models.
Field Summary | |
static DataModelMonitor |
GLOBAL
|
Method Summary | |
void |
addDataModelListener(DataModel target,
DataModelListener listener)
Adds a data model event listener, which will be notified anytime a change affects the target data model. |
java.util.Collection |
findAllDataModels(java.util.Collection clientIds,
java.util.Collection retVal)
Convenience method that finds the data models corresponding to a group of client models. |
DataModel |
findDataModel(java.lang.Object clientId)
Finds the singleton data model corresponding to a given client model. |
java.util.Collection |
findDataModels(java.lang.Object clientId,
java.util.Collection retVal)
Finds the data models corresponding to a given client model. |
void |
removeDataModelListener(DataModelListener listener)
Removes a data model event listener, for all target data models. |
void |
syncDataModelListener(DataModelListener listener)
Syncs a data model event listener with the dynamic model state related to all its registered target models by sending appropriate "add" and "changed" events. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final DataModelMonitor GLOBAL
Method Detail |
public DataModel findDataModel(java.lang.Object clientId)
clientId
- The client model's client ID. None if null.
java.lang.IllegalStateException
- More than one model found.public java.util.Collection findDataModels(java.lang.Object clientId, java.util.Collection retVal)
clientId
- The client model's client ID. Null if none.retVal
- Return value object. Set of data models (DataModel).
Never null. Empty if clientId is null or none are found.
public java.util.Collection findAllDataModels(java.util.Collection clientIds, java.util.Collection retVal)
clientIds
- The client models' client IDs (Object). Never null.retVal
- Return value object. Set of data models (DataModel).
Never null. Can be clientIds.
public void addDataModelListener(DataModel target, DataModelListener listener)
target
- The target data model. Never null.listener
- The event listener. Never null. If the listener
is a duplicate, the previous entry will be replaced.public void removeDataModelListener(DataModelListener listener)
listener
- The event listener. Silently ignores missing and
null listeners.public void syncDataModelListener(DataModelListener listener)
listener
- The event listener. Silently ignores null and missing.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |