uci.graph
Interface MutableGraphModel

All Known Implementing Classes:
MutableGraphSupport, StateDiagramGraphModel, CollabDiagramGraphModel, ClassDiagramGraphModel, UseCaseDiagramGraphModel

public abstract interface MutableGraphModel
extends GraphModel

This interface provides a facade to a net-level representation. Similiar in concept to the Swing class TreeModel.

This interface goes beyond GraphModel in that it allows modifications to the graph, instead of just access.

See Also:
DefaultGraphModel, AdjacencyMatrixGraphModel, uci.graph.demo.WordTransforms

Field Summary
static long serialVersionUID
           
 
Fields inherited from class uci.graph.GraphModel
serialVersionUID
 
Fields inherited from class java.io.Serializable
serialVersionUID
 
Method Summary
 void addEdge(Object edge)
          Add the given edge to the graph, if valid.
 void addNode(Object node)
          Add the given node to the graph, if valid.
 boolean canAddEdge(Object edge)
          Return true if the given object is a valid edge in this graph
 boolean canAddNode(Object node)
          Return true if the given object is a valid node in this graph
 boolean canConnect(Object fromP, Object toP)
          Return true if the two given ports can be connected by a kind of edge to be determined by the ports.
 boolean canConnect(Object fromP, Object toP, Class edgeClass)
          Return true if the two given ports can be connected by the given kind of edge.
 Object connect(Object fromPort, Object toPort)
          Contruct and add a new edge of a kind determined by the ports.
 Object connect(Object fromPort, Object toPort, Class edgeClass)
          Contruct and add a new edge of the given kind.
 void removeEdge(Object edge)
          Remove the given edge from the graph.
 void removeNode(Object node)
          Remove the given node from the graph.
 
Methods inherited from interface uci.graph.GraphModel
addGraphEventListener, getDestPort, getEdges, getInEdges, getNodes, getOutEdges, getOwner, getPorts, getSourcePort, removeGraphEventListener
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Method Detail

canAddNode

public boolean canAddNode(Object node)
Return true if the given object is a valid node in this graph

canAddEdge

public boolean canAddEdge(Object edge)
Return true if the given object is a valid edge in this graph

removeNode

public void removeNode(Object node)
Remove the given node from the graph. Sends a notification.

addNode

public void addNode(Object node)
Add the given node to the graph, if valid. Sends a notification.

addEdge

public void addEdge(Object edge)
Add the given edge to the graph, if valid. Sends a notification.

removeEdge

public void removeEdge(Object edge)
Remove the given edge from the graph. Sends a notification.

canConnect

public boolean canConnect(Object fromP,
                          Object toP)
Return true if the two given ports can be connected by a kind of edge to be determined by the ports.

canConnect

public boolean canConnect(Object fromP,
                          Object toP,
                          Class edgeClass)
Return true if the two given ports can be connected by the given kind of edge.

connect

public Object connect(Object fromPort,
                      Object toPort)
Contruct and add a new edge of a kind determined by the ports. Sends a notification.

connect

public Object connect(Object fromPort,
                      Object toPort,
                      Class edgeClass)
Contruct and add a new edge of the given kind. Sends a notification.