private static void decreaseToMaxZoom(final Graph2DView view) {
    if (view.getZoom() > MAX_ZOOM) {
      view.setZoom(MAX_ZOOM);
    }
  }
Makes sure that the current zoom level does not exceed the maximum zoom level.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/helpers/ZoomHelpers.java