Package edu.uci.ics.jung.visualization.transform

Examples of edu.uci.ics.jung.visualization.transform.MutableTransformer.translate()


        // translate the layout panel down and across so that it is not hard up
        // against the side of the splitPane box.
        MutableTransformer modelTransformer = vv.getRenderContext().getMultiLayerTransformer().getTransformer(
                        Layer.LAYOUT);
        modelTransformer.translate(25, 25);

        // setup the transformers for the visualisation
        e_eft = new EdgeFontTransformer<Object, Font>();
        e_elt = new EdgeLabelTransformer<Object, String>(vv);
        e_ept = new EdgePaintTransformer<Object, Paint>(new Color(40, 40, 40), Color.black, vv);
View Full Code Here


                Point2D q = viewTransformer.inverseTransform(down);
                Point2D p = viewTransformer.inverseTransform(e.getPoint());
                float dx = (float) (p.getX()-q.getX());
                float dy = (float) (p.getY()-q.getY());
               
                viewTransformer.translate(dx, dy);
                down.x = e.getX();
                down.y = e.getY();
            } catch(RuntimeException ex) {
                System.err.println("down = "+down+", e = "+e);
                throw ex;
View Full Code Here

                Point2D q = vv.getRenderContext().getMultiLayerTransformer().inverseTransform(down);
                Point2D p = vv.getRenderContext().getMultiLayerTransformer().inverseTransform(e.getPoint());
                float dx = (float) (p.getX()-q.getX());
                float dy = (float) (p.getY()-q.getY());
               
                modelTransformer.translate(dx, dy);
                down.x = e.getX();
                down.y = e.getY();
            } catch(RuntimeException ex) {
                System.err.println("down = "+down+", e = "+e);
                throw ex;
View Full Code Here

                    Point2D q = vv.getRenderContext().getMultiLayerTransformer().inverseTransform(down);
                    Point2D p = vv.getRenderContext().getMultiLayerTransformer().inverseTransform(e.getPoint());
                    float dx = (float) (p.getX()-q.getX());
                    float dy = (float) (p.getY()-q.getY());
                   
                    modelTransformerMaster.translate(-dx, -dy);
                    down.x = e.getX();
                    down.y = e.getY();
                } catch(RuntimeException ex) {
                    System.err.println("down = "+down+", e = "+e);
                    throw ex;
View Full Code Here

   
            new Thread() {
                public void run() {
                    MutableTransformer transformer = GraphVisualizationPanel.this.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT);
                    for (int i = 0; i < steps; i++) {
                        transformer.translate(dx, dy);
                        try {
                            Thread.sleep(100);
                        } catch (InterruptedException ex) {
                        }
                    }
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.