Package java.awt.event

Examples of java.awt.event.MouseWheelListener


    popup = defaults.popup;

    // We don't seem to get the initial focus event?
    focusedComponentRef = new WeakReference<JEditTextArea>( this );

    addMouseWheelListener( new MouseWheelListener()
    {

      public void mouseWheelMoved( MouseWheelEvent e )
      {
        if( ( e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() ) == Toolkit
View Full Code Here


            public void keyReleased(KeyEvent e) {
                keyEvents.add(e);
            }
        };

        mouseWheelListener = new MouseWheelListener() {
            @Override
            public void mouseWheelMoved(MouseWheelEvent e) {
                mouseEvents.add(e);
            }
        };
View Full Code Here

        );
        repaint();
      }
    })
   
    addMouseWheelListener(new MouseWheelListener() {
      @Override
      public void mouseWheelMoved(MouseWheelEvent e) {
        if(!e.isControlDown()) {
          double r = e.getWheelRotation();
          r=0.10*r*(getModel().getDisplayRect().getWidth());
 
View Full Code Here

            }

        });

        addMouseWheelListener(new MouseWheelListener() {
            @Override
            public void mouseWheelMoved(MouseWheelEvent e) {
                if (e.isControlDown())
                    changeZoom(((double) e.getWheelRotation()) * 0.01);
            }
View Full Code Here

          patternOffset = newPoint;
          repaint();
        }
      }
    });
    addMouseWheelListener(new MouseWheelListener() {
      public void mouseWheelMoved(MouseWheelEvent e) {
        if (e.getWheelRotation() > 0) {
          zoom += 0.1;
        } else {
          zoom -= 0.1;
View Full Code Here

    help.add("Shift-Click to aim a bullet, or press space.");
    help.add("Scroll to zoom in/out on the mouse position");
    help.add("Press '[' or ']' to change tests, and 'r' to restart.");
    model.setImplSpecificHelp(help);

    panel.addMouseWheelListener(new MouseWheelListener() {
      public void mouseWheelMoved(MouseWheelEvent e) {
        int notches = e.getWheelRotation();
        TestbedTest currTest = model.getCurrTest();
        if (currTest == null) {
          return;
View Full Code Here

     
    });
    cvc.setTileTransform(transform);
    cvc9.setTileTransform(AffineTransform.getScaleInstance(2.5, 2.5));
   
    cvc.addMouseWheelListener(new MouseWheelListener(){

      public void mouseWheelMoved(MouseWheelEvent e) {
        if (e.getWheelRotation() > 0)
          applyTransformToCV(cv, cvc, cvc9, AffineTransform.getScaleInstance(.9, .9));
        else
View Full Code Here

    textArea.setSelectionColor(ThemeManager.getCurrentColor(Theme.EDITOR_SELECTED_BACKGROUND_COLOR));
    textArea.setFont(ThemeManager.getCurrentFont(Theme.EDITOR_FONT));

    textArea.setWrapStyleWord(true);

    textArea.addMouseWheelListener(new MouseWheelListener() {

      /**
       * Mouse events bubble up until finding a component with a relative listener.
       * That's why in case we get an event that needs to initiate its default behavior,
       * we just bubble it up to the parent component of the JTextArea. 
View Full Code Here

                                                     */
                                                    jsp.getVerticalScrollBar().setValue(jsp.getVerticalScrollBar().getMaximum() - jsp.getVerticalScrollBar().getVisibleAmount());
                                                }
                                            }
                                        });
                                        logging.addMouseWheelListener(new MouseWheelListener() {
                                            public void mouseWheelMoved(MouseWheelEvent e) {
                                                int val = jsp.getVerticalScrollBar().getValue();
                                                if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
                                                    val += e.getUnitsToScroll() * jsp.getVerticalScrollBar().getUnitIncrement();
                                                }
View Full Code Here

        public void stateChanged(ChangeEvent e)
        {
          palastPanel.calculateBuildings();
        }
      });
      day.addMouseWheelListener(new MouseWheelListener()
      { 
        @Override
        public void mouseWheelMoved(MouseWheelEvent e)
        {
          int val = 0;
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.