gumbo.visualize.data
Class GraphModel

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.visualize.data.DataModel
              |
              +--gumbo.visualize.data.WholeModel
                    |
                    +--gumbo.visualize.data.GraphModel
All Implemented Interfaces:
Disposable, java.io.Serializable
Direct Known Subclasses:
ListModel

public class GraphModel
extends WholeModel

A whole model whose data elements have data relationships (has an internal topology, such as a graph, tree, or list).

In the part model tree, a graph model can have none or more vertex and edge 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
GraphModel(java.lang.Object clientId, java.lang.Object clientData)
          Creates a new instance.
 
Method Summary
 void addEdgeModel(EdgeModel child, PortModel[] ports)
          Adds an edge model as a child in this model's part model tree.
 VertexModel addVertexModel(VertexModel child)
          Adds a vertex 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.
protected  void implDispose()
          Disposes part model children (recursively), and then disposes this model.
 void removeEdgeModel(EdgeModel child)
          Removes a child edge model from this model's part model tree, and disposes it.
 void removeVertexModel(VertexModel child)
          Removes a child vertex 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, 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

GraphModel

public GraphModel(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

addVertexModel

public VertexModel addVertexModel(VertexModel child)
Adds a vertex 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.

removeVertexModel

public void removeVertexModel(VertexModel child)
Removes a child vertex 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()

addEdgeModel

public void 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

implDispose

protected void implDispose()
Description copied from class: WholeModel
Disposes part model children (recursively), and then disposes this model.

Overrides:
implDispose in class WholeModel