code: public void setZoomFactor(double newZoomFactor) {
  		if (zoomFactor==newZoomFactor) return;
  		if (newZoomFactor<=0 || Double.isInfinite(newZoomFactor) || Double.isNaN(newZoomFactor))
  			throw new IllegalArgumentException("Invalid zoom factor: "+newZoomFactor);
  		if (getResizeStrategy()==ResizeStrategy.CUSTOM_ZOOM) {
  			rescroller.prepare();
  		}
  		double oldZoomFactor=zoomFactor;
  		zoomFactor=newZoomFactor;
  		boolean canRescroll=viewer.getSynchronizer().zoomFactorChangedCanIRescroll(viewer);
  		if (getResizeStrategy()==ResizeStrategy.CUSTOM_ZOOM) {
  			resizeNow();
  			// do not rescroll if we're following another viewer; the scrolling will be synchronized later
  			if (canRescroll) {
  				rescroller.rescroll();
  				viewer.getSynchronizer().doneRescrolling(viewer);
  			}
  		} else {
  			// no rescrolling is necessary, actually
  			if (canRescroll)
  				viewer.getSynchronizer().doneRescrolling(viewer);
  		}
  		propertyChangeSupport.firePropertyChange("zoomFactor", oldZoomFactor, newZoomFactor);
  	}
docs: Sets the zoom factor to use when the resize strategy is CUSTOM_ZOOM.
  <p>
  Note that calling this function does not change the current resize strategy.
  @throws IllegalArgumentException if {@code newZoomFactor} is not a positive number