Examples of JGraphOrganicLayout


Examples of com.jgraph.layout.organic.JGraphOrganicLayout

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