gumbo.visualize.data
Class SuperModel

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.visualize.data.DataModel
              |
              +--gumbo.visualize.data.WholeModel
                    |
                    +--gumbo.visualize.data.SuperModel
All Implemented Interfaces:
Disposable, java.io.Serializable

public class SuperModel
extends WholeModel

A whole model that contains none or more whole models. In other words, a super model is a group of whole models that is suitable for viewing as a whole. This distinction is important for view layout and presentation, where it may be important for each whole model to remain distinct within the overall super model presentation. A supermodel may contain edge models to connect vertex models in separate whole models.

In the whole model tree, a super model is a non-leaf node. In the part model tree, a super model can have none or more edge models.

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

Nested Class Summary
 
Nested classes inherited from class gumbo.visualize.data.WholeModel
WholeModel.GlobalWholeTree
 
Field Summary
static Group TYPES
          A singleton immutable group containing the type (Class) of this class.
 
Constructor Summary
SuperModel(java.lang.Object clientId, java.lang.Object clientData)
          Creates a new super model.
 
Method Summary
 EdgeModel addEdgeModel(EdgeModel child, PortModel[] ports)
          Adds an edge model as a child in this model's part model tree.
 void addWholeModel(WholeModel child)
          Adds a child whole model to this whole model.
 PartModelField.EventOut getAddedPartModelOut()
          Sends the part model after it is added to this whole model.
 PartModelField.EventOut getRemovingPartModelOut()
          Sends the part model before it is removed from this whole model.
 void removeEdgeModel(EdgeModel child)
          Removes a child edge model from this model's part model tree, and disposes it.
 void removeWholeModel(WholeModel child)
          Removes a child whole model from this whole model, but does not dispose it.
 
Methods inherited from class gumbo.visualize.data.WholeModel
addPartModel, checkAddPartModel, disposeAll, findAllPartModelSubs, findPartModelSubs, findWholeModelRoot, findWholeModelSubs, findWholeModelSupers, getPartModelChildren, getWholeModelChildren, getWholeModelParent, implDispose, removePartModel
 
Methods inherited from class gumbo.visualize.data.DataModel
getClientData, getClientId, initDataModel, setClientData
 
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
 

Field Detail

TYPES

public static final Group TYPES
A singleton immutable group containing the type (Class) of this class. Supports both Set and List views.

Constructor Detail

SuperModel

public SuperModel(java.lang.Object clientId,
                  java.lang.Object clientData)
Creates a new super model.

Parameters:
clientId - See DataModel. Null if none, in which case the client ID defaults to this object.
clientData - See DataModel. Null if none.
Method Detail

addWholeModel

public void addWholeModel(WholeModel child)
Adds a child whole model to this whole model.

Parameters:
child - The child model. If null or already a child, does nothing.

removeWholeModel

public void removeWholeModel(WholeModel child)
Removes a child whole model from this whole model, but does not dispose it.

Parameters:
child - The child model. If null or not a child, does nothing.

addEdgeModel

public EdgeModel addEdgeModel(EdgeModel child,
                              PortModel[] ports)
Adds an edge model as a child in this model's part model tree. The model must be "addable" as defined by its verifyPartModelAddable().

Parameters:
child - The child model. Ignored if null.
Returns:
Reference to model.

removeEdgeModel

public void removeEdgeModel(EdgeModel child)
Removes a child edge model from this model's part model tree, and disposes it.

Parameters:
child - The child model. If null or not a child, does nothing.
See Also:
AbstractDisposable.dispose()

getAddedPartModelOut

public final PartModelField.EventOut getAddedPartModelOut()
Description copied from class: WholeModel
Sends the part model after it is added to this whole model. Never null.

Specified by:
getAddedPartModelOut in class WholeModel

getRemovingPartModelOut

public final PartModelField.EventOut getRemovingPartModelOut()
Description copied from class: WholeModel
Sends the part model before it is removed from this whole model. Never null.

Specified by:
getRemovingPartModelOut in class WholeModel