public static void keepZoomValid(final Graph2DView view) {
    decreaseToMaxZoom(view);
    increaseToMinZoom(view);
  }
Keeps the zoom level within valid bounds.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/helpers/ZoomHelpers.java