gumbo.visualize.data
Class WholeView

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.visualize.data.DataView
              |
              +--gumbo.visualize.data.WholeView
All Implemented Interfaces:
Disposable

public final class WholeView
extends DataView

A data view representing a view of a whole model. Typically, data views are created by view factories (see DataViewFactory). A whole view is associated with one whole model, but a whole model can be associated with none or more whole views. A whole view contains none or more part views, one for each part model in the client whole model. It may also contain part models resulting from associations between the client's part models and those in other whole models (such as callouts).

A whole view is a root node in a "part view tree". The part view tree is single layered (all children are leaves) and contains part views that make up the whole view.

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

Constructor Summary
WholeView(WholeModel model)
          Used by a data view factory to create an instance.
 
Method Summary
 java.util.Collection findModelPartViews(java.util.Collection types, java.util.Collection retVal)
          Convenience method for finding part views of this whole view whose models are assignable to (instance of) any one of a group of types.
 java.util.Set getPartViewChildren()
          Gets an immutable view of the children of this view in its part view tree.
protected  void implDispose()
          Disposes the part tree children first (while the tree is valid for use in disposing their graphic views), then the super class, then this class.
 
Methods inherited from class gumbo.visualize.data.DataView
getDataModel, getGraphicView, initGraphicView
 
Methods inherited from class gumbo.util.AbstractDisposable
dispose, isDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WholeView

public WholeView(WholeModel model)
Used by a data view factory to create an instance. Must use initGraphicView() to make this view valid.

Parameters:
model - The whole model. Never null.
Method Detail

getPartViewChildren

public java.util.Set getPartViewChildren()
Gets an immutable view of the children of this view in its part view tree.

Returns:
The children (PartView). Never null.

findModelPartViews

public java.util.Collection findModelPartViews(java.util.Collection types,
                                               java.util.Collection retVal)
Convenience method for finding part views of this whole view whose models are assignable to (instance of) any one of a group of types.

Parameters:
types - Part model types (Class) to include. If null, all types are included.
retVal - Return value object. The views (PartView). Never null.
Returns:
Reference to retVal. Never null.

implDispose

protected void implDispose()
Disposes the part tree children first (while the tree is valid for use in disposing their graphic views), then the super class, then this class.

Overrides:
implDispose in class DataView