org.tigris.gef.graph
Interface MutableGraphModel

All Superinterfaces:
BaseGraphModel, GraphModel, java.io.Serializable
All Known Implementing Classes:
AdjacencyListGraphModel, DefaultGraphModel, MutableGraphSupport

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


Method Summary
 void addEdge(java.lang.Object edge)
          Add the given edge to the graph, if valid.
 void addNode(java.lang.Object node)
          Add the given node to the graph, if valid.
 void addNodeRelatedEdges(java.lang.Object node)
          Add existing edges that are related to the node.
 boolean canAddEdge(java.lang.Object edge)
          Return true if the given object is a valid edge in this graph
 boolean canAddNode(java.lang.Object node)
          Return true if the given object is a valid node in this graph
 boolean canChangeConnectedNode(java.lang.Object newNode, java.lang.Object oldNode, java.lang.Object edge)
          Return true if the connection to the old node can be rerouted to the new node.
 boolean canConnect(java.lang.Object fromP, java.lang.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(java.lang.Object fromP, java.lang.Object toP, java.lang.Object edgeType)
          Return true if the two given ports can be connected by the given kind of edge.
 boolean canDragNode(java.lang.Object node)
          Return true if the type of the given object can be mapped to a supported type.
 void changeConnectedNode(java.lang.Object newNode, java.lang.Object oldNode, java.lang.Object edge, boolean isSource)
          Reroutes the connection to the old node to be connected to the new node.
 java.lang.Object connect(java.lang.Object fromPort, java.lang.Object toPort)
          Contruct and add a new edge of a kind determined by the ports.
 java.lang.Object connect(java.lang.Object fromPort, java.lang.Object toPort, java.lang.Class edgeClass)
          Contruct and add a new edge with given attributes.
 java.lang.Object connect(java.lang.Object fromPort, java.lang.Object toPort, java.lang.Object edgeType)
          Contruct and add a new edge with given attributes.
 java.lang.Object connect(java.lang.Object fromPort, java.lang.Object toPort, java.lang.Object edgeType, java.util.Map attributes)
          Contruct and add a new edge with given attributes.
 boolean containsEdge(java.lang.Object edge)
          Return true if the given object is present as a edge in the graph
 boolean containsNode(java.lang.Object node)
          Return true if the given object is present as a node in the graph
 java.lang.Object createNode(java.lang.String name, java.util.Hashtable args)
          Return a valid node in this graph
 void dragNode(java.lang.Object node)
          Create a new node based on the given node and add it to the graph
 boolean isEnclosable(java.lang.Object handle, java.lang.Object encloser)
          Returns true if handle can be enclosed into encloser.
 void removeEdge(java.lang.Object edge)
          Remove the given edge from the graph.
 void removeNode(java.lang.Object node)
          Remove the given node from the graph.
 
Methods inherited from interface org.tigris.gef.graph.GraphModel
getEdges, getInEdges, getNodes, getOutEdges, getPorts, setConnectionConstrainer
 
Methods inherited from interface org.tigris.gef.graph.BaseGraphModel
addGraphEventListener, getDestPort, getOwner, getSourcePort, removeGraphEventListener
 

Method Detail

containsNode

boolean containsNode(java.lang.Object node)
Return true if the given object is present as a node in the graph


canAddNode

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


createNode

java.lang.Object createNode(java.lang.String name,
                            java.util.Hashtable args)
Return a valid node in this graph


canAddEdge

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


canDragNode

boolean canDragNode(java.lang.Object node)
Return true if the type of the given object can be mapped to a supported type.


removeNode

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


addNode

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


containsEdge

boolean containsEdge(java.lang.Object edge)
Return true if the given object is present as a edge in the graph


addEdge

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


addNodeRelatedEdges

void addNodeRelatedEdges(java.lang.Object node)
Add existing edges that are related to the node.


removeEdge

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


dragNode

void dragNode(java.lang.Object node)
Create a new node based on the given node and add it to the graph


canChangeConnectedNode

boolean canChangeConnectedNode(java.lang.Object newNode,
                               java.lang.Object oldNode,
                               java.lang.Object edge)
Return true if the connection to the old node can be rerouted to the new node.


canConnect

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


canConnect

boolean canConnect(java.lang.Object fromP,
                   java.lang.Object toP,
                   java.lang.Object edgeType)
Return true if the two given ports can be connected by the given kind of edge.


changeConnectedNode

void changeConnectedNode(java.lang.Object newNode,
                         java.lang.Object oldNode,
                         java.lang.Object edge,
                         boolean isSource)
Reroutes the connection to the old node to be connected to the new node.


connect

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


connect

java.lang.Object connect(java.lang.Object fromPort,
                         java.lang.Object toPort,
                         java.lang.Class edgeClass)
Contruct and add a new edge with given attributes. Sends a notification.


connect

java.lang.Object connect(java.lang.Object fromPort,
                         java.lang.Object toPort,
                         java.lang.Object edgeType)
Contruct and add a new edge with given attributes. Sends a notification.


connect

java.lang.Object connect(java.lang.Object fromPort,
                         java.lang.Object toPort,
                         java.lang.Object edgeType,
                         java.util.Map attributes)
Contruct and add a new edge with given attributes. Sends a notification.


isEnclosable

boolean isEnclosable(java.lang.Object handle,
                     java.lang.Object encloser)
Returns true if handle can be enclosed into encloser.