Examples of DirectedGraph


Examples of org.eclipse.draw2d.graph.DirectedGraph

    }

    private void execute() {
        editor.doSave(null);
        Map<Long, Node> mapping = new HashMap<Long, Node>();
        DirectedGraph graph = createDirectedGraph(mapping);
        DirectedGraphLayout layout = new DirectedGraphLayout();
        layout.visit(graph);
        for (Map.Entry<Long, Node> entry: mapping.entrySet()) {
            Node node = entry.getValue();
            DefaultElementWrapper elementWrapper = (DefaultElementWrapper)
View Full Code Here

Examples of org.eclipse.draw2d.graph.DirectedGraph

        // TODO: implement changes as a command, so we can support undo
        editor.doSave(null);
    }
   
    protected DirectedGraph createDirectedGraph(Map<Long, Node> mapping) {
        DirectedGraph graph = new DirectedGraph();
        WorkflowProcess process = (WorkflowProcess) ((ProcessWrapper) ((GenericModelEditor) editor).getModel()).getProcess();
        for (org.drools.definition.process.Node processNode: process.getNodes()) {
            Node node = new Node();
            Integer width = (Integer) processNode.getMetaData("width");
            Integer height = (Integer) processNode.getMetaData("height");
View Full Code Here

Examples of org.eclipse.draw2d.graph.DirectedGraph

* Action for auto layouting a RuleFlow.
*/
public class HorizontalAutoLayoutAction extends VerticalAutoLayoutAction {

    protected DirectedGraph createDirectedGraph(Map<Long, Node> mapping) {
        DirectedGraph graph = super.createDirectedGraph(mapping);
        graph.setDirection(PositionConstants.HORIZONTAL);
        return graph;
    }
View Full Code Here

Examples of org.eclipse.draw2d.graph.DirectedGraph

    private Map partToNodesMap;
    private DirectedGraph graph;

    public void layoutDiagram(ProcessEditPart diagram) {
        partToNodesMap = new HashMap();
        graph = new DirectedGraph();
        addNodes(diagram);
        if (graph.nodes.size() > 0) {
            addEdges(diagram);
            new DirectedGraphLayout().visit(graph);
            applyResults(diagram);
View Full Code Here

Examples of org.eclipse.draw2d.graph.DirectedGraph

    }

    private void execute() {
        editor.doSave(null);
        Map<Long, Node> mapping = new HashMap<Long, Node>();
        DirectedGraph graph = createDirectedGraph(mapping);
        DirectedGraphLayout layout = new DirectedGraphLayout();
        layout.visit(graph);
        for (Map.Entry<Long, Node> entry: mapping.entrySet()) {
            Node node = entry.getValue();
            DefaultElementWrapper elementWrapper = (DefaultElementWrapper)
View Full Code Here

Examples of org.eclipse.draw2d.graph.DirectedGraph

        // TODO: implement changes as a command, so we can support undo
        editor.doSave(null);
    }
   
    protected DirectedGraph createDirectedGraph(Map<Long, Node> mapping) {
        DirectedGraph graph = new DirectedGraph();
        WorkflowProcess process = (WorkflowProcess) ((ProcessWrapper) ((GenericModelEditor) editor).getModel()).getProcess();
        for (org.kie.api.definition.process.Node processNode: process.getNodes()) {
            Node node = new Node();
            Integer width = (Integer) processNode.getMetaData().get("width");
            Integer height = (Integer) processNode.getMetaData().get("height");
View Full Code Here

Examples of org.gephi.graph.api.DirectedGraph

                    }
                    GraphController gc = Lookup.getDefault().lookup(GraphController.class);

                    AbstractShortestPathAlgorithm algorithm;
                    if (gc.getModel().getGraphVisible() instanceof DirectedGraph) {
                        DirectedGraph graph = (DirectedGraph) gc.getModel().getGraphVisible();
                        algorithm = new BellmanFordShortestPathAlgorithm(graph, n);
                        algorithm.compute();
                    } else {
                        Graph graph = gc.getModel().getGraphVisible();
                        algorithm = new DijkstraShortestPathAlgorithm(graph, n);
View Full Code Here

Examples of org.gephi.graph.api.DirectedGraph

        return null;
    }

    public NodeRanking getInDegreeRanking() {
        GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
        DirectedGraph graph = model.getDirectedGraphVisible();
        NodeRanking degreeRanking = RankingFactory.getNodeInDegreeRanking(graph);
        if (degreeRanking.getMinimumValue() != null && degreeRanking.getMaximumValue() != null && !degreeRanking.getMinimumValue().equals(degreeRanking.getMaximumValue())) {
            return degreeRanking;
        }
        return null;
View Full Code Here

Examples of org.gephi.graph.api.DirectedGraph

        return null;
    }

    public NodeRanking getOutDegreeRanking() {
        GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
        DirectedGraph graph = model.getDirectedGraphVisible();
        NodeRanking degreeRanking = RankingFactory.getNodeOutDegreeRanking(graph);
        if (degreeRanking.getMinimumValue() != null && degreeRanking.getMaximumValue() != null && !degreeRanking.getMinimumValue().equals(degreeRanking.getMaximumValue())) {
            return degreeRanking;
        }
        return null;
View Full Code Here

Examples of org.gephi.graph.api.DirectedGraph

        if (degreeRanking.getMinimumValue() != null && degreeRanking.getMaximumValue() != null && !degreeRanking.getMinimumValue().equals(degreeRanking.getMaximumValue())) {
            rankingList.add(degreeRanking);
        }

        if (model.isDirected()) {
            DirectedGraph directedGraph = model.getDirectedGraphVisible();
            NodeRanking inDegreeRanking = RankingFactory.getNodeInDegreeRanking(directedGraph);
            if (inDegreeRanking.getMinimumValue() != null && inDegreeRanking.getMaximumValue() != null && !inDegreeRanking.getMinimumValue().equals(inDegreeRanking.getMaximumValue())) {
                rankingList.add(inDegreeRanking);
            }
            NodeRanking outDegreeRanking = RankingFactory.getNodeOutDegreeRanking(directedGraph);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.