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
485186
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);
	}
975930
@NonNull
    public Crossfade setResizeBehavior(int resizeBehavior) {
        if (resizeBehavior >= RESIZE_BEHAVIOR_NONE && resizeBehavior <= RESIZE_BEHAVIOR_SCALE) {
            mResizeBehavior = resizeBehavior;
        }
        return this;
    }
597845
public final void setBorderWidth(int unit,
                                     int size) {
        if (size < 0) {
            throw new IllegalArgumentException("Border width cannot be less than zero.");
        }

        int scaledSize = (int) TypedValue.applyDimension(unit, size, getResources().getDisplayMetrics());
        setBorderInternal(scaledSize, mBorderColor, true);
    }
813320
public void addConstantFactor(String factorName, PlateFactor factor) {
    constantFactors.add(factor);
    constantFactorNames.add(factorName);
  }
235243
protected void setMaxTextWidthFactor() {
        mapView.getModel().displayModel.setMaxTextWidthFactor(Float.valueOf(sharedPreferences.getString(SamplesApplication.SETTING_TEXTWIDTH, "0.7")));
    }
609074
public void setCustomFont(final Font FONT) {
        if (null == customFont) {
            _customFont = FONT;
            fireUpdateEvent(RESIZE_EVENT);
        } else {
            customFont.set(FONT);
        }
    }
564966
public PackedDecimal setScale(int n, RoundingMode mode) {
        BigDecimal result = toBigDecimal().setScale(n, mode);
        return PackedDecimal.valueOf(result);
    }
1295363
public void setZoom(int zoom)
    {
        if (zoom == this.zoomLevel)
        {
            return;
        }

        TileFactoryInfo info = getTileFactory().getInfo();
        // don't repaint if we are out of the valid zoom levels
        if (info != null && (zoom < info.getMinimumZoomLevel() || zoom > info.getMaximumZoomLevel()))
        {
            return;
        }

        // if(zoom >= 0 && zoom <= 15 && zoom != this.zoom) {
        int oldzoom = this.zoomLevel;
        Point2D oldCenter = getCenter();
        Dimension oldMapSize = getTileFactory().getMapSize(oldzoom);
        this.zoomLevel = zoom;
        this.firePropertyChange("zoom", oldzoom, zoom);

        Dimension mapSize = getTileFactory().getMapSize(zoom);

        setCenter(new Point2D.Double(oldCenter.getX() * (mapSize.getWidth() / oldMapSize.getWidth()), oldCenter.getY()
                * (mapSize.getHeight() / oldMapSize.getHeight())));

        repaint();
    }
582826
public void setAngularFactor(float x, float y, float z) {
        Native3DRigidBody.setAngularFactor(getNative(), x, y, z);
    }
30300
public synchronized void scaleTextSize(float scaleFactor, byte zoomLevel) {
        if (!textScales.containsKey(zoomLevel) || scaleFactor != textScales.get(zoomLevel)) {
            for (int i = 0, n = this.rulesList.size(); i < n; ++i) {
                Rule rule = this.rulesList.get(i);
                if (rule.zoomMin <= zoomLevel && rule.zoomMax >= zoomLevel) {
                    rule.scaleTextSize(scaleFactor * this.baseTextSize, zoomLevel);
                }
            }
            textScales.put(zoomLevel, scaleFactor);
        }
    }
942054
public void addFactor(String factorName, T factor, VariablePattern factorPattern) {
    parametricFactors.add(factor);
    factorPatterns.add(factorPattern);
    parametricFactorNames.add(factorName);
  }
534882
public void setSize(int newWidth, int newHeight) {
		saveState();
		Bbox bbox = getBounds();
		if (width != newWidth || height != newHeight) {
			this.width = newWidth;
			this.height = newHeight;
			if (viewState.getScale() < getMinimumScale()) {
				// The new scale is too low, re-apply old values:
				double scale = getBestScale(bbox);
				doSetScale(snapToResolution(scale, ZoomOption.LEVEL_FIT));
			}
			// Use the same center point for the new bounds
			doSetOrigin(bbox.getCenterPoint());
			fireEvent(true, null);
		}
	}
533335
public void addUnreplicatedFactor(String factorName, ParametricFactor factor) {
    super.addUnreplicatedFactor(factorName, factor, factor.getVars());
  }
863993
protected Coordinate calculatePosition(boolean zoomIn, Coordinate rescalePoint) {
		ViewPort viewPort = mapPresenter.getViewPort();
		Coordinate position = viewPort.getPosition();
		int index = viewPort.getResolutionIndex(viewPort.getResolution());
		double resolution = viewPort.getResolution();
		if (zoomIn && index < viewPort.getResolutionCount() - 1) {
			resolution = viewPort.getResolution(index + 1);

		} else if (!zoomIn && index > 0) {
			resolution = viewPort.getResolution(index - 1);
		}
		double factor = viewPort.getResolution() / resolution;
		double dX = (rescalePoint.getX() - position.getX()) * (1 - 1 / factor);
		double dY = (rescalePoint.getY() - position.getY()) * (1 - 1 / factor);

		return new Coordinate(position.getX() + dX, position.getY() + dY);
	}
1354000
public void setInputWidth(final int inputWidth) {
		if (inputWidth > 100) {
			throw new IllegalArgumentException(
					"inputWidth (" + inputWidth + ") cannot be greater than 100 percent.");
		}
		getOrCreateComponentModel().inputWidth = Math.max(0, inputWidth);
	}
593197
public void setR(double R)
    {
        if(R <= 0 || Double.isNaN(R) || Double.isInfinite(R))
            throw new IllegalArgumentException("R must be positive, not " + R);
        this.R = R;
    }
944140
public void addConstantFactor(String factorName, Factor factor) {
    if (variables.containsAll(factor.getVars())) {
      int factorNum = factors.size();
      factors.add(factor);
      factorNames.add(factorName);

      VariableNumMap factorVars = factor.getVars();
      for (Integer varNum : factorVars.getVariableNums()) {
        variableFactorMap.put(varNum, factorNum);
        factorVariableMap.put(factorNum, varNum);
      }
    } else {
      Preconditions.checkState(!isRoot);
      crossingFactors.add(factor);
    }
  }