Package java.awt.event

Examples of java.awt.event.MouseWheelListener


    private void registerMouseListeners() {
        DragInsensitiveMouseClickListener listener = new DragInsensitiveMouseClickListener(new GridPanelMouseListener());
        addMouseListener(listener);
        addMouseMotionListener(listener);
        addMouseWheelListener(new MouseWheelListener() {
            @Override
            public void mouseWheelMoved(MouseWheelEvent e) {
                zoom(-e.getWheelRotation());
            }
        });
View Full Code Here


                    }
                }
            }
        });

        graph.addMouseWheelListener(new MouseWheelListener() {

            public void mouseWheelMoved(MouseWheelEvent e) {
                graph.setScale(graph.getScale()
                        / Math.pow(ZOOM_FACTOR, e.getWheelRotation()));
            }
View Full Code Here

        assertTrue(str.indexOf("wheelScrollingEnabled=true") > 0);
    }

    public final void testProcessMouseWheelEvent() {
        eventProcessed = false;
        scrollPane.addMouseWheelListener(new MouseWheelListener() {

            public void mouseWheelMoved(MouseWheelEvent arg0) {
                eventProcessed = true;
            }
View Full Code Here

        Point p2 = b.getLocationOnScreen();
        int scroll = -15;
        movePointer(p1, p2);
        f.toFront();
        robot.delay(100);
        b.addMouseWheelListener(new MouseWheelListener() {

            public void mouseWheelMoved(MouseWheelEvent mwe) {
                mouseEvent = mwe;
            }
        });
View Full Code Here

        assertTrue(str.indexOf("wheelScrollingEnabled=true") > 0);
    }

    public final void testProcessMouseWheelEvent() {
        eventProcessed = false;
        scrollPane.addMouseWheelListener(new MouseWheelListener() {

            public void mouseWheelMoved(MouseWheelEvent arg0) {
                eventProcessed = true;
            }
View Full Code Here

        };

        parent.zoomIn.addActionListener(zoom);
        parent.zoomOut.addActionListener(zoom);

        addMouseWheelListener(new MouseWheelListener() {

            public void mouseWheelMoved(MouseWheelEvent mwe) {
                int clics = mwe.getWheelRotation();
                if (clics == 0) {
                    return;
View Full Code Here

  TabbedPane(MainWindow window) {
    mainWindow = window;

    setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

    addMouseWheelListener(new MouseWheelListener() {
      public void mouseWheelMoved(MouseWheelEvent e) {
        int direction = e.getWheelRotation();
        int index = getSelectedIndex();
        int maxIndex = getTabCount() - 1;
        if ((index == 0 && direction < 0)
View Full Code Here

          SwingFactory.setIcon(item, "icons/redo.png");
      }
    }
   
    // mouse listener to resize font
    area.addMouseWheelListener(new MouseWheelListener() {
     
      @Override
      public void mouseWheelMoved(MouseWheelEvent e) {
       
        Font font = area.getFont();
View Full Code Here

                }

                dragstart = e.getPoint();
            }
        });
        component.addMouseWheelListener(new MouseWheelListener() {

            public void mouseWheelMoved(MouseWheelEvent e) {
                z += e.getWheelRotation()*5;
            }

View Full Code Here

        // now add our top-level panel
        getContentPane().add(top, BorderLayout.CENTER);

        // observe mouse-wheel events in the scene view panel to allow
        // scrolling the wheel to select the tile to be placed
        _svpanel.addMouseWheelListener(new MouseWheelListener() {
            public void mouseWheelMoved (MouseWheelEvent e) {
                if (e.getWheelRotation() < 0) {
                    _tpanel.selectPreviousTile();
                } else {
                    _tpanel.selectNextTile();
View Full Code Here

TOP

Related Classes of java.awt.event.MouseWheelListener

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.