Package java.awt.event

Examples of java.awt.event.MouseWheelListener


      public void mouseReleased(MouseEvent e) {
        showPopupMenu(e);      }
    });

    mList.addMouseWheelListener(new MouseWheelListener() {
      public void mouseWheelMoved(MouseWheelEvent e) {
        int selected = mList.getSelectedIndex() + e.getWheelRotation();
        if (selected < 0) {
          selected = 0;
        } else if (selected > mList.getModel().getSize()) {
View Full Code Here


          return new MouseEvent(component, id, ev.getWhen(),
              ev.getModifiersEx() | ev.getModifiers(), x, y,
              ev.getClickCount(), ev.isPopupTrigger(), ev.getButton());
        }
      };
    MouseWheelListener mouseWheelListener = new MouseWheelListener() {
        public void mouseWheelMoved(MouseWheelEvent ev) {
          if (isEnabled()) {
            // Mouse wheel changes camera location
            float delta = -2.5f * ev.getWheelRotation();
            // Multiply delta by 10 if shift is down
View Full Code Here

          int value = e.getAdjustable().getValue();
          slidingDataset.setFirstCategoryIndex(value);
        }
      });

      chartPanel.addMouseWheelListener(new MouseWheelListener() {

        @Override
        public void mouseWheelMoved(MouseWheelEvent e) {
          int scrollType = e.getScrollType();
          if (scrollType == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
View Full Code Here

        }
      }
    };
    addMouseListener(mouseListener);
    addMouseMotionListener(mouseListener);
    addMouseWheelListener(new MouseWheelListener() {       
        public void mouseWheelMoved(MouseWheelEvent ev) {
          if (ev.getModifiers() == getToolkit().getMenuShortcutKeyMask()) {
            controller.zoom((float)(ev.getWheelRotation() < 0
                ? Math.pow(1.05, -ev.getWheelRotation())
                : Math.pow(0.95, ev.getWheelRotation())));
View Full Code Here

    canvas3D.addMouseListener(mouseListener);
    canvas3D.addMouseMotionListener(mouseListener);
   
    if (pitchAndScaleChangeSupported) {
      canvas3D.addMouseWheelListener(new MouseWheelListener() {
          public void mouseWheelMoved(MouseWheelEvent ev) {
            // Mouse move along Y axis with Alt down changes scale
            setViewScale(Math.max(0.5f, Math.min(1.3f, getViewScale() * (float)Math.exp(ev.getWheelRotation() * ZOOM_FACTOR))));
          }
        });
View Full Code Here

            public void keyReleased(KeyEvent e){
                ScreenPlayer.this.recorder.viewer.AddObject(e);
            }         
        };
      
        mouseWheelListener = new MouseWheelListener() {
            //@Override
            public void mouseWheelMoved(MouseWheelEvent e) {
                ScreenPlayer.this.recorder.viewer.AddObject(e);
            }
        };
View Full Code Here

        });
    }
   
    private void doAddImgListener()
    {
        m_imgView.addMouseWheelListener(new MouseWheelListener()
        {
            public void mouseWheelMoved(MouseWheelEvent ev)
            {
                int orientation = 0;
                orientation = JImgView.getNextOrientation(m_imgView.getOrientation(), ev.getWheelRotation() >= 0);
View Full Code Here

        Mode mode = new ScrollMode(scroll);

        overlay.pushMode(mode);

        overlay.addMouseWheelListener(
            new MouseWheelListener() {
                public void mouseWheelMoved(MouseWheelEvent e) {
                    System.out.println("wheel moved " + e.getWheelRotation());
                }
            }
        );
View Full Code Here

          dragging = false;
        }

      });

      flamePanel.addMouseWheelListener(new MouseWheelListener() {

        @Override
        public void mouseWheelMoved(MouseWheelEvent e) {
          flamePanel_mouseWheelEvent(e);
        }
View Full Code Here

                   mousePress.x -= panelTranslationX;
                   mousePress.y -= panelTranslationY;
               }
            });
           
            addMouseWheelListener(new MouseWheelListener() {

                public void mouseWheelMoved(MouseWheelEvent e) {
                    int rot = e.getWheelRotation();
                    if (rot>0)
                        scale *= rot*1.2;
 
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.