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); }
public void mouseWheelMoved(MouseWheelEvent event) { synchronized (this) { int rotation = event.getWheelRotation(); if (hyperStack) { if (rotation > 0) IJ.run(imp, "Next Slice [>]", ""); else if (rotation < 0) IJ.run(imp, "Previous Slice [<]", ""); } else { int slice = imp.getCurrentSlice() + rotation; if (slice < 1) slice = 1; else if (slice > imp.getStack().getSize()) slice = imp.getStack().getSize(); imp.setSlice(slice); imp.updateStatusbarValue(); SyncWindows.setZ(this, slice); } } }
public void mouseWheelMoved(MouseWheelEvent e) { translateCM(e.getWheelRotation()); updateColors(); }
public void mouseWheelMoved(MouseWheelEvent e) { int notches = e.getWheelRotation(); if ((zoomScale -= 0.05f * notches) < 0.09999f) zoomScale = 0.1f; repaint(); }