org.argouml.uml.diagram
Class UMLMutableGraphSupport

java.lang.Object
  |
  +--org.tigris.gef.graph.MutableGraphSupport
        |
        +--org.argouml.uml.diagram.UMLMutableGraphSupport
All Implemented Interfaces:
org.tigris.gef.graph.GraphModel, org.tigris.gef.graph.MutableGraphModel, java.io.Serializable
Direct Known Subclasses:
ClassDiagramGraphModel, CollabDiagramGraphModel, DeploymentDiagramGraphModel, SequenceDiagramGraphModel, StateDiagramGraphModel, UseCaseDiagramGraphModel

public abstract class UMLMutableGraphSupport
extends org.tigris.gef.graph.MutableGraphSupport

UMLMutableGraphSupport is a helper class which extends MutableGraphSupport to provide additional helper and common methods for UML Diagrams.

See Also:
Serialized Form

Field Summary
protected  java.util.Vector _edges
          constains all the edges in the graphmodel/diagram.
protected  java.util.Vector _nodes
          contains all the nodes in the graphmodel/diagram.
 
Fields inherited from class org.tigris.gef.graph.MutableGraphSupport
_graphListeners
 
Constructor Summary
UMLMutableGraphSupport()
          constructor.
 
Method Summary
 boolean constainsEdge(java.lang.Object edge)
           
 boolean containsNode(java.lang.Object node)
           
 java.util.Vector getEdges()
          get all the edges from the graphmodel/diagram
 java.util.Vector getNodes()
          get all the nodes from the graphmodel/diagram
 void removeEdge(java.lang.Object edge)
          remove an edge from the graphmodel and notify GEF
 void removeNode(java.lang.Object node)
          remove a node from the diagram and notify GEF
 
Methods inherited from class org.tigris.gef.graph.MutableGraphSupport
addGraphEventListener, canChangeConnectedNode, canConnect, canDragNode, changeConnectedNode, connect, containsEdge, containsEdgePort, containsNodePort, containsPort, dragNode, fireEdgeAdded, fireEdgeRemoved, fireGraphChanged, fireNodeAdded, fireNodeRemoved, getGraphListeners, removeGraphEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.tigris.gef.graph.MutableGraphModel
addEdge, addNode, addNodeRelatedEdges, canAddEdge, canAddNode, canConnect, connect
 
Methods inherited from interface org.tigris.gef.graph.GraphModel
getDestPort, getInEdges, getOutEdges, getOwner, getPorts, getSourcePort
 

Field Detail

_nodes

protected java.util.Vector _nodes
contains all the nodes in the graphmodel/diagram.

_edges

protected java.util.Vector _edges
constains all the edges in the graphmodel/diagram.
Constructor Detail

UMLMutableGraphSupport

public UMLMutableGraphSupport()
constructor.
See Also:
MutableGraphSupport
Method Detail

getNodes

public java.util.Vector getNodes()
get all the nodes from the graphmodel/diagram
Returns:
Vector of nodes in the graphmodel/diagram
See Also:
GraphModel.getNodes()

getEdges

public java.util.Vector getEdges()
get all the edges from the graphmodel/diagram
Returns:
Vector of edges in the graphmodel/diagram

containsNode

public boolean containsNode(java.lang.Object node)
Overrides:
containsNode in class org.tigris.gef.graph.MutableGraphSupport

constainsEdge

public boolean constainsEdge(java.lang.Object edge)

removeNode

public void removeNode(java.lang.Object node)
remove a node from the diagram and notify GEF
Parameters:
node - node to remove

removeEdge

public void removeEdge(java.lang.Object edge)
remove an edge from the graphmodel and notify GEF
Parameters:
edge - edge to remove


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook