Package prefuse

Examples of prefuse.Display.pan()


    public void mouseDragged(MouseEvent e) {
        if ( UILib.isButtonPressed(e, m_button) ) {
            Display display = (Display)e.getComponent();
            int x = e.getX(),   y = e.getY();
            int dx = x-m_xDown, dy = y-m_yDown;
            display.pan(dx,dy);
            m_xDown = x;
            m_yDown = y;
            display.repaint();
        }
    }
View Full Code Here


        // --------------------------------------------------------------------
        // set up a display to show the visualization
       
        Display display = new Display(m_vis);
        display.setSize(700,700);
        display.pan(350, 350);
        display.setForeground(Color.GRAY);
        display.setBackground(Color.WHITE);
       
        // main display controls
        display.addControlListener(new FocusControl(1));
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.