gumbo.visualize.data
Class ListModel

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

public class ListModel
extends GraphModel

A graph model representing a list of entries. A list consists of none or one source vertex, with each non-source vertex having one incoming edge.

Version:
$Revision: 1.3 $
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
ListModel(java.lang.Object clientId, java.lang.Object clientData)
          Creates a new instance.
 
Method Summary
 void addEdgeModel(EdgeModel model, PortModel[] ports)
          Adds an edge model as a child in this model's part model tree.
 VertexModel addVertexModel(VertexModel model)
          Adds a vertex model as a child of this model, and as the new last entry in this list.
 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.GraphModel
getAddedPartModelOut, getRemovingPartModelOut, implDispose
 
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

ListModel

public ListModel(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 model)
Adds a vertex model as a child of this model, and as the new last entry in this list. An edge to the entry will be created automatically.

Overrides:
addVertexModel in class GraphModel
Parameters:
model - The model to be added. Ignored if null.
Returns:
Reference to model.

removeVertexModel

public void removeVertexModel(VertexModel child)
Description copied from class: GraphModel
Removes a child vertex model from this model's part model tree, and disposes it.

Overrides:
removeVertexModel in class GraphModel
Parameters:
child - The child model. If null or not a child, does nothing.
Throws:
java.lang.UnsupportedOperationException - Not yet implemented.
See Also:
AbstractDisposable.dispose()

addEdgeModel

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

Overrides:
addEdgeModel in class GraphModel
Parameters:
model - The child model. Ignored if null.
Returns:
Reference to model.
Throws:
java.lang.UnsupportedOperationException - Edges are updated automatically.

removeEdgeModel

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

Overrides:
removeEdgeModel in class GraphModel
Parameters:
child - The child model. If null or not a child, does nothing.
Throws:
java.lang.UnsupportedOperationException - Edges are updated automatically.
See Also:
AbstractDisposable.dispose()