Package diva.graph.basic

Examples of diva.graph.basic.BasicLayoutTarget


        _model = new BasicGraphModel();

        GraphPane pane = new GraphPane(new BasicGraphController(), _model);
        _editor = new JGraph(pane);
        context.getContentPane().add("Center", _editor);
        _target = new BasicLayoutTarget(_editor.getGraphPane()
                .getGraphController());
        _layout = new LevelLayout(_target);

        LayoutWidget lw = new LayoutWidget(_target, _model.getRoot(), true);
        context.getContentPane().add("South", lw);
View Full Code Here


     */
    public void bogusLayout(MutableGraphModel model, AppContext context) {
        BasicGraphController gc = new BasicGraphController();
        context.getContentPane().add(new JGraph(new GraphPane(gc, model)));

        RandomLayout random = new RandomLayout(new BasicLayoutTarget(gc));
        random.layout(model.getRoot());
    }
View Full Code Here

            AppContext context) {
        final BasicGraphController bgc = new BasicGraphController();
        context.getContentPane().add(new JGraph(new GraphPane(bgc, model)));
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                RandomLayout random = new RandomLayout(new BasicLayoutTarget(
                        bgc));
                random.layout(model.getRoot());
            }
        });
    }
View Full Code Here

     */
    public void setModelPostDisplay(MutableGraphModel model, AppContext context) {
        BasicGraphController gc = new BasicGraphController();
        gc.addGraphViewListener(new IncrementalLayoutListener(
                new IncrLayoutAdapter(
                        new LevelLayout(new BasicLayoutTarget(gc))), null));
        context.getContentPane().add(new JGraph(new GraphPane(gc, model)));
    }
View Full Code Here

            AppContext context) {
        final BasicGraphController bgc = new BasicGraphController();
        context.getContentPane().add(new JGraph(new GraphPane(bgc, model)));
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                RandomLayout random = new RandomLayout(new BasicLayoutTarget(
                        bgc));
                random.layout(model.getRoot());
            }
        });
    }
View Full Code Here

        final MutableGraphModel model = makeTypedModel();
        bgc.setGraphModel(model);

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                LevelLayout random = new LevelLayout(new BasicLayoutTarget(bgc));
                random.layout(model.getRoot());
            }
        });
    }
View Full Code Here

            final GraphController gc = gp.getGraphController();
            final GraphPane pane = gp;
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    // Layout is a bit stupid
                    LayoutTarget target = new BasicLayoutTarget(gc);
                    LevelLayout staticLayout = new LevelLayout(target);
                    staticLayout.setOrientation(LevelLayout.HORIZONTAL);
                    staticLayout.layout(layoutGraph.getRoot());
                    pane.repaint();
                }
View Full Code Here

     *  within an entity.
     */
    public class EntityLayout extends AbstractGlobalLayout {
        /** Create a new layout manager. */
        public EntityLayout() {
            super(new BasicLayoutTarget(getController()));
        }
View Full Code Here

            final GraphController gc = gp.getGraphController();
            final GraphPane pane = gp;
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    // Layout is a bit stupid
                    LayoutTarget target = new BasicLayoutTarget(gc);
                    LevelLayout staticLayout = new LevelLayout(target);
                    staticLayout.setOrientation(LevelLayout.HORIZONTAL);
                    staticLayout.layout(layoutGraph.getRoot());
                    pane.repaint();
                }
View Full Code Here

TOP

Related Classes of diva.graph.basic.BasicLayoutTarget

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.