private void zoom(
      final MouseWheelEvent event, final boolean zoomOut, final boolean centerSelected) {
    if (!hasSelectedNode() || !centerSelected) {
      // Zoom to cursor in the absence of selected nodes
      super.mouseWheelMoved(event);
    } else if (zoomOut) {
      centerZoom(
          1 - (m_zyGraph.getSettings().getMouseSettings().getZoomSensitivity() * ZOOM_SUB_FACTOR),
          centerSelected);
    } else {
      centerZoom(
          1 + (m_zyGraph.getSettings().getMouseSettings().getZoomSensitivity() * ZOOM_SUB_FACTOR),
          centerSelected);
    }
  }
Listens to mouse wheel events in edit mode.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/ZyEditModeMouseWheelListener.java