org.eclipse.draw2d.graph.DirectedGraph Java Examples
The following examples show how to use
org.eclipse.draw2d.graph.DirectedGraph.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CFGNodeEditPart.java From JAADAS with GNU General Public License v3.0 | 5 votes |
public void contributeNodesToGraph(DirectedGraph graph, HashMap map){ Node node = new Node(this); node.width = getFigure().getBounds().width;//getNode().getWidth(); int height = 22; if (((CFGNode)getModel()).getBefore() != null){ height += ((CFGNode)getModel()).getBefore().getChildren().size() * 22; } if (((CFGNode)getModel()).getAfter() != null){ height += ((CFGNode)getModel()).getAfter().getChildren().size() * 22; } node.height = height;//getFigure().getBounds().height; graph.nodes.add(node); map.put(this, node); }
Example #2
Source File: CFGNodeEditPart.java From JAADAS with GNU General Public License v3.0 | 5 votes |
public void contributeEdgesToGraph(DirectedGraph graph, HashMap map) { List outgoing = getSourceConnections(); for (int i = 0; i < outgoing.size(); i++){ CFGEdgeEditPart edge = (CFGEdgeEditPart)outgoing.get(i); edge.contributeToGraph(graph, map); } }
Example #3
Source File: CFGNodeEditPart.java From JAADAS with GNU General Public License v3.0 | 5 votes |
public void applyGraphResults(DirectedGraph graph, HashMap map){ Node node = (Node)map.get(this); ((CFGNodeFigure)getFigure()).setBounds(new Rectangle(node.x, node.y, node.width, node.height));//getFigure().getBounds().height));//getFigure().getBounds().height)); List outgoing = getSourceConnections(); for (int i = 0; i < outgoing.size(); i++){ CFGEdgeEditPart edge = (CFGEdgeEditPart)outgoing.get(i); edge.applyGraphResults(graph, map); } }