Ejemplo n.º 1
0
    public void mouseWheelMoved(MouseWheelEvent e) {
      int amount = e.getWheelRotation();

      Point2D p = new Point2D.Double(e.getPoint().getX(), e.getPoint().getY());

      if (amount > 0) zoomOut(p);
      if (amount < 0) zoomIn(p);
    }
Ejemplo n.º 2
0
 @Override
 public final void mouseWheelMoved(final MouseWheelEvent e) {
   scroll.pos(scroll.pos() + e.getUnitsToScroll() * 20);
   rend.repaint();
 }
Ejemplo n.º 3
0
 public void mouseWheelMoved(MouseWheelEvent e) {
   int notches = e.getWheelRotation();
   if ((zoomScale -= 0.05f * notches) < 0.09999f) zoomScale = 0.1f;
   repaint();
 }