gumbo.visualize.data
Class DataViewMonitor

java.lang.Object
  |
  +--gumbo.visualize.data.DataViewMonitor

public final class DataViewMonitor
extends java.lang.Object

Singleton (global) monitor for data view. All data views are responsible for adding and removing themselves from this monitor. Monitors data view state changes and maps data models to data views.

Version:
$Revision: 1.1 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Field Summary
static DataViewMonitor GLOBAL
           
 
Method Summary
 java.util.Collection findAllDataViews(java.util.Collection models, java.util.Collection retVal)
          Convenience method that finds the data views corresponding to a group of data models.
 DataView findDataView(DataModel model)
          Finds the singleton data view corresponding to a given data model.
 java.util.Collection findDataViews(DataModel model, java.util.Collection retVal)
          Finds the data views corresponding to a given data model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBAL

public static final DataViewMonitor GLOBAL
Method Detail

findDataView

public DataView findDataView(DataModel model)
Finds the singleton data view corresponding to a given data model.

Parameters:
model - The client model. None if null.
Throws:
java.lang.IllegalStateException - More than one view found.

findDataViews

public java.util.Collection findDataViews(DataModel model,
                                          java.util.Collection retVal)
Finds the data views corresponding to a given data model.

Parameters:
model - The client model. None if null.
retVal - Return value object. Set of data views (DataView). Never null. Empty if model is null or none are found.
Returns:
Reference to retVal. Never null.

findAllDataViews

public java.util.Collection findAllDataViews(java.util.Collection models,
                                             java.util.Collection retVal)
Convenience method that finds the data views corresponding to a group of data models.

Parameters:
models - The data models (DataModel). Never null.
retVal - Return value object. Set of data views (DataView). Never null. Can be models.
Returns:
Reference to retVal. Never null.