Package org.eclipse.draw2d.graph

Examples of org.eclipse.draw2d.graph.Edge


        for (org.kie.definition.process.Node processNode: process.getNodes()) {
            for (List<Connection> connections: processNode.getIncomingConnections().values()) {
                for (Connection connection: connections) {
                    Node source = mapping.get(connection.getFrom().getId());
                    Node target = mapping.get(connection.getTo().getId());
                    graph.edges.add(new Edge(source, target));
                }
            }
        }
        return graph;
    }
View Full Code Here


        for (org.kie.api.definition.process.Node processNode: process.getNodes()) {
            for (List<Connection> connections: processNode.getIncomingConnections().values()) {
                for (Connection connection: connections) {
                    Node source = mapping.get(connection.getFrom().getId());
                    Node target = mapping.get(connection.getTo().getId());
                    graph.edges.add(new Edge(source, target));
                }
            }
        }
        return graph;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    protected void addEdges(ElementConnectionEditPart connectionPart) {
        Node source = (Node) partToNodesMap.get(connectionPart.getSource());
        Node target = (Node) partToNodesMap.get(connectionPart.getTarget());
        Edge e = new Edge(connectionPart, source, target);
        e.weight = 2;
        graph.edges.add(e);
        partToNodesMap.put(connectionPart, e);
    }
View Full Code Here

            applyResults(connectionPart);
        }
    }

    protected void applyResults(ElementConnectionEditPart connectionPart)    {
        Edge e = (Edge) partToNodesMap.get(connectionPart);
        NodeList nodes = e.vNodes;
        PolylineConnection conn = (PolylineConnection) connectionPart.getConnectionFigure();
        conn.setTargetDecoration(new PolygonDecoration());
        if (nodes != null) {
            List<Bendpoint> bends = new ArrayList<Bendpoint>();
            for (int i = 0; i < nodes.size(); i++) {
                Node vn = nodes.getNode(i);
                int x = vn.x;
                int y = vn.y;
                if (e.isFeedback()) {
                    bends.add(new AbsoluteBendpoint(x, y + vn.height));
                    bends.add(new AbsoluteBendpoint(x, y));
                } else {
                    bends.add(new AbsoluteBendpoint(x, y));
                    bends.add(new AbsoluteBendpoint(x, y + vn.height));
View Full Code Here

    }
    for (int i = 0; i < relationshipsToConsider.length; i++) {
      InternalRelationship relationship = relationshipsToConsider[i];
      Node source = (Node) mapping.get(relationship.getSource());
      Node dest = (Node) mapping.get(relationship.getDestination());
      Edge edge = new Edge(relationship, source, dest);
      graph.edges.add(edge);
    }
    DirectedGraphLayout directedGraphLayout = new ExtendedDirectedGraphLayout();
    directedGraphLayout.visit(graph);
View Full Code Here

        for (org.drools.definition.process.Node processNode: process.getNodes()) {
            for (List<Connection> connections: processNode.getIncomingConnections().values()) {
                for (Connection connection: connections) {
                    Node source = mapping.get(connection.getFrom().getId());
                    Node target = mapping.get(connection.getTo().getId());
                    graph.edges.add(new Edge(source, target));
                }
            }
        }
        return graph;
    }
View Full Code Here

     
      Node tgtNode = shapeToNode.get(target);
      if (tgtNode == null) {
        tgtNode = shapeToNode.get(target.eContainer());
      }
      Edge edge = new Edge(srcNode, tgtNode);
      edge.data = connection;
      edgeList.add(edge);
    }
    dg.nodes = nodeList;
    dg.edges = edgeList;
View Full Code Here

    }

    protected void addEdges(ElementConnectionEditPart connectionPart) {
        Node source = (Node) partToNodesMap.get(connectionPart.getSource());
        Node target = (Node) partToNodesMap.get(connectionPart.getTarget());
        Edge e = new Edge(connectionPart, source, target);
        e.weight = 2;
        graph.edges.add(e);
        partToNodesMap.put(connectionPart, e);
    }
View Full Code Here

            applyResults(connectionPart);
        }
    }

    protected void applyResults(ElementConnectionEditPart connectionPart)    {
        Edge e = (Edge) partToNodesMap.get(connectionPart);
        NodeList nodes = e.vNodes;
        PolylineConnection conn = (PolylineConnection) connectionPart.getConnectionFigure();
        conn.setTargetDecoration(new PolygonDecoration());
        if (nodes != null) {
            List bends = new ArrayList();
            for (int i = 0; i < nodes.size(); i++) {
                Node vn = nodes.getNode(i);
                int x = vn.x;
                int y = vn.y;
                if (e.isFeedback()) {
                    bends.add(new AbsoluteBendpoint(x, y + vn.height));
                    bends.add(new AbsoluteBendpoint(x, y));
                } else {
                    bends.add(new AbsoluteBendpoint(x, y));
                    bends.add(new AbsoluteBendpoint(x, y + vn.height));
View Full Code Here

        for (org.kie.api.definition.process.Node processNode: process.getNodes()) {
            for (List<Connection> connections: processNode.getIncomingConnections().values()) {
                for (Connection connection: connections) {
                    Node source = mapping.get(connection.getFrom().getId());
                    Node target = mapping.get(connection.getTo().getId());
                    graph.edges.add(new Edge(source, target));
                }
            }
        }
        return graph;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.graph.Edge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.