gumbo.visualize.data
Class GroupModel

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

public class GroupModel
extends WholeModel

A whole model whose data elements have no data relationships (has no internal topology, such as an unordered bag and set).

In the part model tree, a group model can have none or more element models.

Version:
$Revision: 1.18 $
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
GroupModel(java.lang.Object clientId, java.lang.Object clientData)
          Creates a new instance.
 
Method Summary
 ElementModel addElementModel(ElementModel child)
          Adds an element model as a child in this model's part model tree.
 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 removeElementModel(ElementModel child)
          Removes a child element model from this model's part model tree, and disposes 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

GroupModel

public GroupModel(java.lang.Object clientId,
                  java.lang.Object clientData)
Creates a new instance.

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

addElementModel

public ElementModel addElementModel(ElementModel child)
Adds an element 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.

removeElementModel

public void removeElementModel(ElementModel child)
Removes a child element 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