private void centerZoom(final double factor, final boolean centerSelected) {
    if (centerSelected) {
      final Set<NodeType> selectedNodes = m_zyGraph.getSelectedNodes();

      if (selectedNodes.size() != 0) {
        MoveFunctions.centerNodes(m_zyGraph, selectedNodes);
      }
    }

    m_zyGraph.zoom(factor);
  }
Listens to mouse wheel events in edit mode.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/ZyEditModeMouseWheelListener.java