Package edu.uci.ics.jung.algorithms.layout

Examples of edu.uci.ics.jung.algorithms.layout.FRLayout


    this.setVisible(true);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
 
  public BasicVisualizationServer<String,String> construire() {
    Layout <String,String> layout = new FRLayout(this.graph);
    layout.setSize(new Dimension(300,300));
    BasicVisualizationServer<String,String> vue = new BasicVisualizationServer<String,String>(layout);
    vue.setPreferredSize(new Dimension(350,350));
    vue.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());
    vue.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller());
    vue.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);
View Full Code Here


      }
    }
   
    /********** draw graph **************/
   
    Layout<MyVertex, MyEdge> layout = new FRLayout(graph);
    layout.setSize(new Dimension(450,600));
   
   
    vv = new VisualizationViewer<MyVertex, MyEdge>(layout);
    vv.setPreferredSize(new Dimension(450,500));
   
View Full Code Here

            v2.addUserDatum("name", entry.getValue(), new UserDataContainer.CopyAction.Clone());
            g.addVertex(v2);
            Edge e = new UndirectedSparseEdge(v1, v2);
            g.addEdge(e);
        }
        FRLayout l = new FRLayout(g);
        PluggableRenderer r = new PluggableRenderer();
        VisualizationViewer vv = new VisualizationViewer((Layout) l, r);

        VisualizationImageServer vis =
                new VisualizationImageServer((edu.uci.ics.jung.algorithms.layout.Layout) vv.getGraphLayout(), vv.getGraphLayout().getCurrentSize());
View Full Code Here

        } catch (IllegalAccessException iae) {
            Logger.getLogger(ClusterViewer.class.getName()).log(Level.WARNING, "Attempted to use a private ctor, defaulting to FRLayout", iae);
        } catch (InvocationTargetException ite) {
            Logger.getLogger(ClusterViewer.class.getName()).log(Level.WARNING, "Attempt to instantiate Layout from picker failed, defaulting to FRLayout", ite);
        }
        return new FRLayout(g);
    }
View Full Code Here

    public static void main(String[] args) throws IOException
    {
        JFrame jf = new JFrame();
        Graph g = getGraph();
        VisualizationViewer vv = new VisualizationViewer(new FRLayout(g));
        jf.getContentPane().add(vv);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jf.pack();
        jf.setVisible(true);
    }
View Full Code Here

        graph =
            TestGraphs.getOneComponentGraph();
        collapsedGraph = graph;
        collapser = new GraphCollapser(graph);
       
        layout = new FRLayout(graph);

        Dimension preferredSize = new Dimension(400,400);
        final VisualizationModel visualizationModel =
            new DefaultVisualizationModel(layout, preferredSize);
        vv =  new VisualizationViewer(visualizationModel, preferredSize);
View Full Code Here

        g_array[6] = TestGraphs.createChainPlusIsolates(0, 20);

        Graph<? extends Object, ? extends Object> g = g_array[4]; // initial graph

        final VisualizationViewer<Integer,Number> vv =
            new VisualizationViewer<Integer,Number>(new FRLayout(g));
       
        vv.getRenderContext().setVertexFillPaintTransformer(new PickableVertexPaintTransformer<Integer>(vv.getPickedVertexState(), Color.red, Color.yellow));
       
        final DefaultModalGraphMouse<Integer,Number> graphMouse = new DefaultModalGraphMouse<Integer,Number>();
        vv.setGraphMouse(graphMouse);
View Full Code Here

        // create a simple graph for the demo
        graph =
            TestGraphs.getOneComponentGraph();
        collapser = new GraphCollapser(graph);
       
        layout = new FRLayout(graph);

        Dimension preferredSize = new Dimension(400,400);
        final VisualizationModel visualizationModel =
            new DefaultVisualizationModel(layout, preferredSize);
        vv =  new VisualizationViewer(visualizationModel, preferredSize);
View Full Code Here

TOP

Related Classes of edu.uci.ics.jung.algorithms.layout.FRLayout

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.