|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.graph.MutableGraphSupport
org.argouml.uml.diagram.UMLMutableGraphSupport
org.argouml.uml.diagram.static_structure.ClassDiagramGraphModel
This class defines a bridge between the UML meta-model representation of the design and the GraphModel interface used by GEF. This class handles only UML Class digrams.
Field Summary | |
protected java.lang.Object |
_model
The "home" UML model of this diagram, not all ModelElements in this graph are in the home model, but if they are added and don't already have a model, they are placed in the "home model". |
protected static org.apache.log4j.Logger |
cat
|
(package private) static long |
serialVersionUID
|
Fields inherited from class org.argouml.uml.diagram.UMLMutableGraphSupport |
_edges, _nodes |
Fields inherited from class org.tigris.gef.graph.MutableGraphSupport |
_graphListeners |
Constructor Summary | |
ClassDiagramGraphModel()
|
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)
Adds the edges from the given 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)
When rerouting an edge, this is the first method to be called by SelectionRerouteEdge, in order to determine whether the graphmodel will allow the change. |
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 |
getDestPort(java.lang.Object edge)
Return the other end of an edge |
java.util.Vector |
getInEdges(java.lang.Object port)
Return all edges going to given port (read Model Element). |
java.lang.Object |
getNamespace()
|
java.util.Vector |
getOutEdges(java.lang.Object port)
Return all edges going from given port (model element) |
java.lang.Object |
getOwner(java.lang.Object port)
Return the node or edge that owns the given port |
java.util.Vector |
getPorts(java.lang.Object nodeOrEdge)
Return all ports on node or edge |
java.lang.Object |
getSourcePort(java.lang.Object edge)
Return one end of an edge |
private void |
rerouteAssociation(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge,
boolean isSource)
helper method for changeConnectedNode |
private void |
rerouteDependency(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge,
boolean isSource)
helper method for changeConnectedNode |
private void |
rerouteGeneralization(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge,
boolean isSource)
helper method for changeConnectedNode |
private void |
rerouteLink(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge,
boolean isSource)
helper method for changeConnectedNode |
void |
setNamespace(java.lang.Object namespace)
|
void |
vetoableChange(java.beans.PropertyChangeEvent pce)
|
Methods inherited from class org.argouml.uml.diagram.UMLMutableGraphSupport |
canConnect, connect, connect, constainsEdge, containsNode, getEdges, getNodes, removeEdge, removeNode |
Methods inherited from class org.tigris.gef.graph.MutableGraphSupport |
addGraphEventListener, canConnect, canDragNode, containsEdge, containsEdgePort, containsNodePort, containsPort, createNode, 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 |
Field Detail |
protected static org.apache.log4j.Logger cat
protected java.lang.Object _model
static final long serialVersionUID
Constructor Detail |
public ClassDiagramGraphModel()
Method Detail |
public java.lang.Object getNamespace()
public void setNamespace(java.lang.Object namespace)
public java.util.Vector getPorts(java.lang.Object nodeOrEdge)
getPorts
in interface org.tigris.gef.graph.GraphModel
public java.lang.Object getOwner(java.lang.Object port)
getOwner
in interface org.tigris.gef.graph.BaseGraphModel
public java.util.Vector getInEdges(java.lang.Object port)
getInEdges
in interface org.tigris.gef.graph.GraphModel
public java.util.Vector getOutEdges(java.lang.Object port)
getOutEdges
in interface org.tigris.gef.graph.GraphModel
public java.lang.Object getSourcePort(java.lang.Object edge)
getSourcePort
in interface org.tigris.gef.graph.BaseGraphModel
public java.lang.Object getDestPort(java.lang.Object edge)
getDestPort
in interface org.tigris.gef.graph.BaseGraphModel
public boolean canAddNode(java.lang.Object node)
canAddNode
in interface org.tigris.gef.graph.MutableGraphModel
public boolean canAddEdge(java.lang.Object edge)
canAddEdge
in interface org.tigris.gef.graph.MutableGraphModel
public void addNode(java.lang.Object node)
addNode
in interface org.tigris.gef.graph.MutableGraphModel
public void addEdge(java.lang.Object edge)
addEdge
in interface org.tigris.gef.graph.MutableGraphModel
public void addNodeRelatedEdges(java.lang.Object node)
addNodeRelatedEdges
in interface org.tigris.gef.graph.MutableGraphModel
MutableGraphModel.addNodeRelatedEdges(Object)
public void vetoableChange(java.beans.PropertyChangeEvent pce)
vetoableChange
in interface java.beans.VetoableChangeListener
public boolean canChangeConnectedNode(java.lang.Object newNode, java.lang.Object oldNode, java.lang.Object edge)
restricted to class<->association changes for now.
canChangeConnectedNode
in interface org.tigris.gef.graph.MutableGraphModel
newNode
- this is the new node that one of the ends is dragged to.oldNode
- this is the existing node that is already connected.edge
- this is the edge that is being dragged/rerouted
public void changeConnectedNode(java.lang.Object newNode, java.lang.Object oldNode, java.lang.Object edge, boolean isSource)
changeConnectedNode
in interface org.tigris.gef.graph.MutableGraphModel
newNode
- this is the new node that one of the ends is dragged to.oldNode
- this is the existing node that is already connected.edge
- this is the edge that is being dragged/reroutedisSource
- tells us which end is being rerouted.private void rerouteAssociation(java.lang.Object newNode, java.lang.Object oldNode, java.lang.Object edge, boolean isSource)
private void rerouteGeneralization(java.lang.Object newNode, java.lang.Object oldNode, java.lang.Object edge, boolean isSource)
empty at the moment
private void rerouteDependency(java.lang.Object newNode, java.lang.Object oldNode, java.lang.Object edge, boolean isSource)
empty at the moment
private void rerouteLink(java.lang.Object newNode, java.lang.Object oldNode, java.lang.Object edge, boolean isSource)
empty at the moment
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040316) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |