Package org.eclipse.draw2d.graph

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


        // 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.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

    }

    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

        editor.doSave(null);
    }
   
    @SuppressWarnings("unchecked")
    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

    private Map<AbstractGraphicalEditPart, Object> partToNodesMap;
    private DirectedGraph graph;

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

    super(styles);
  }

  protected void applyLayoutInternal(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double boundsX, double boundsY, double boundsWidth, double boundsHeight) {
    HashMap mapping = new HashMap(entitiesToLayout.length);
    DirectedGraph graph = new DirectedGraph();
    for (int i = 0; i < entitiesToLayout.length; i++) {
      InternalNode internalNode = entitiesToLayout[i];
      Node node = new Node(internalNode);
      node.setSize(new Dimension(10, 10));
      mapping.put(internalNode, node);
View Full Code Here

    }

    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

        // 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

* 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

    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

TOP

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

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.