Package com.jgraph.layout

Examples of com.jgraph.layout.JGraphFacade


        this.edgeMap.put(edge.id, new Pair(line.getFromModel() != null ? line
            .getFromModel().getId() : null, line.getToModel().getId()));
      }
    }

    JGraphFacade facade = new JGraphFacade(jgraph);
    facade.setIgnoresUnconnectedCells(false);
    JGraphHierarchicalLayout layout = new JGraphHierarchicalLayout();
    layout.setOrientation(SwingConstants.WEST);
    layout.setIntraCellSpacing(70.0);
    layout.setLayoutFromSinks(false);
    layout.run(facade);
    Map nested = facade.createNestedMap(true, true);
    if (nested != null) {
      this.hideDummyNodes(nested);
      this.addGroups(state.getGraphs(), nested, state);
      this.ensureNoOverlap(nested, state);
      nested = this.shiftMap(nested, state);
View Full Code Here


            }
        }
        view.insert(createdObjects.toArray());

        if (doLayout) {
            JGraphFacade facade = new JGraphFacade(graph);

            JGraphOrganicLayout layout = new JGraphOrganicLayout();
            layout.setNodeDistributionCostFactor(5000000000000.0);
            layout.setEdgeLengthCostFactor(1000);
            layout.setEdgeCrossingCostFactor(1000000);
            layout.setOptimizeBorderLine(false);
            layout.setOptimizeEdgeDistance(false);

            // JGraphSimpleLayout layout = new
            // JGraphSimpleLayout(JGraphSimpleLayout.TYPE_TILT, 4000, 2000);
            layout.run(facade);
            Map nested = facade.createNestedMap(true, true); // Obtain a map of the
                                                             // resulting attribute
                                                             // changes from the facade

            edit(nested); // Apply the results to the actual graph
        }
View Full Code Here

TOP

Related Classes of com.jgraph.layout.JGraphFacade

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.