Determine whether or not a rectangle that shows the target map's maximum extent should be shown.

@param drawTargetMaxExtent
should the max extent be marked on the map?
@since 1.8.0
166430
@Api
	public void setDrawTargetMaxExtent(boolean drawTargetMaxExtent) {
		this.drawTargetMaxExtent = drawTargetMaxExtent;

		// Immediately draw or remove the max extent rectangle:
		if (drawTargetMaxExtent) {
			targetMaxExtentRectangle = new GfxGeometry("targetMaxExtentRectangle");
			targetMaxExtentRectangle.setStyle(targetMaxExtentRectangleStyle);

			Bbox targetMaxExtent = getOverviewMaxBounds();

			Bbox box = getMapModel().getMapView().getWorldViewTransformer().worldToView(targetMaxExtent);
			LinearRing shell = getMapModel().getGeometryFactory().createLinearRing(
					new Coordinate[] { new Coordinate(-2, -2), new Coordinate(getWidth() + 2, -2),
							new Coordinate(getWidth() + 2, getHeight() + 2), new Coordinate(-2, getHeight() + 2) });
			LinearRing hole = getMapModel().getGeometryFactory().createLinearRing(
					new Coordinate[] { new Coordinate(box.getX(), box.getY()),
							new Coordinate(box.getMaxX(), box.getY()), new Coordinate(box.getMaxX(), box.getMaxY()),
							new Coordinate(box.getX(), box.getMaxY()) });
			Polygon polygon = getMapModel().getGeometryFactory().createPolygon(shell, new LinearRing[] { hole });
			targetMaxExtentRectangle.setGeometry(polygon);
			render(targetMaxExtentRectangle, RenderGroup.SCREEN, RenderStatus.ALL);
		} else {
			render(targetMaxExtentRectangle, RenderGroup.SCREEN, RenderStatus.DELETE);
			targetMaxExtentRectangle = null;
		}
	}
839617
private CoverageDataSourcePixel getSourceMinAndMax(float source,
			int sourceFloor, float valueLocation) {

		int min = sourceFloor;
		int max = sourceFloor;
		float offset;
		if (source < valueLocation) {
			min--;
			offset = 1.0f - (valueLocation - source);
		} else {
			max++;
			offset = source - valueLocation;
		}

		return new CoverageDataSourcePixel(source, min, max, offset);
	}
868479
public final void setMax(final int max) {
		if (max < 0) {
			throw new IllegalArgumentException(ILLEGAL_MAX);
		}
		if (max != getMax()) {
			getOrCreateComponentModel().max = max;
		}
	}
933013
def update_extent_from_map_canvas(self):
        

        self.bounding_box_group.setTitle(
            self.tr('Bounding box from the map canvas'))
        # Get the extent as [xmin, ymin, xmax, ymax]
        extent = viewport_geo_array(self.iface.mapCanvas())
        self.update_extent(extent)
362881
function(rect) {
        var minX = rect.origin.x,
            maxX = minX + rect.extent.x;
        var minY = rect.origin.y,
            maxY = minY + rect.extent.y;

        if (rect.extent.x < 0) {
            minX = maxX;
            maxX = rect.origin.x;
        }

        if (rect.extent.y < 0) {
            minY = maxY;
            maxY = rect.origin.y;
        }

        return (
            minX <= this.x && this.x < maxX &&
            minY <= this.y && this.y < maxY
        );
    }
393785
public void setTextMaxAngle( Float value) {
    PropertyValue propertyValue = textMaxAngle(value);
    constantPropertyUsageMap.put(PROPERTY_TEXT_MAX_ANGLE, propertyValue);
    layer.setProperties(propertyValue);
  }
1323536
function() {
        var extent = null;
        if (this.sphericalMercator) {
            extent = this.map.calculateBounds();
        } else {
            extent = OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this);
        }
        return extent;
    }
682053
function(zoomLevel) {

			var self = this;

			if (zoomLevel == null) {
				zoomLevel = self.__zoomLevel;
			}

			self.__maxScrollLeft = Math.max((self.__contentWidth * zoomLevel) - self.__clientWidth, 0);
			self.__maxScrollTop = Math.max((self.__contentHeight * zoomLevel) - self.__clientHeight, 0);

		}
645148
def update_extent_from_rectangle(self):
        

        self.show()
        self.canvas.unsetMapTool(self.rectangle_map_tool)
        self.canvas.setMapTool(self.pan_tool)

        rectangle = self.rectangle_map_tool.rectangle()
        if rectangle:
            self.bounding_box_group.setTitle(
                self.tr('Bounding box from rectangle'))
            extent = rectangle_geo_array(rectangle, self.iface.mapCanvas())
            self.update_extent(extent)
928785
public void setMaxBatchSize(final String maxBatchSize) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "MaxBatchSize", maxBatchSize);
        }
        _maxBatchSize = (maxBatchSize == null ? null : Integer.valueOf(maxBatchSize));

    }
87865
function(options) {
        //restricted is true by default
        var restricted = (options) ? options.restricted : true;

        var maxExtent = this.getMaxExtent({
            'restricted': restricted 
        });
        this.zoomToExtent(maxExtent);
    }
410611
@Override
    public void draw(@NonNull Canvas canvas) {
        pruneRipples();

        // Clip to the dirty bounds, which will be the drawable bounds if we
        // have a mask or content and the ripple bounds if we're projecting.
        final Rect bounds = getDirtyBounds();
        final int saveCount = canvas.save();
        canvas.clipRect(bounds);

        drawContent(canvas);
        drawBackgroundAndRipples(canvas);

        canvas.restoreToCount(saveCount);
    }
1365516
public Rectangle getMaxRectabgle(){
		return new Rectangle((int)xLB.max, (int)yLB.max, (int)(xUB.max - xLB.max), (int)(yUB.max - yLB.max));
	}
1260739
public void useMaxDimensions() {

        int availableHeight = CmsToolbarPopup.getAvailableHeight();
        int availableWidth = CmsToolbarPopup.getAvailableWidth();
        setDialogSize(availableWidth, availableHeight);
    }
246701
public MapBounds expand(final int margin, final Rectangle paintArea) {
        final double size;
        if (this.bbox.getHeight() == 0 ||
                this.bbox.getWidth() / this.bbox.getHeight() > paintArea.getWidth() / paintArea.getHeight()) {
            // it's the width of the feature that is a limiting factor
            size = paintArea.getWidth();
        } else {
            // it's the height of the feature that is a limiting factor
            size = paintArea.getHeight();
        }
        final double factor = size / (size - 2.0 * margin);

        final double destWidth = this.bbox.getWidth() * factor;
        final double destHeight = this.bbox.getHeight() * factor;

        final double centerX = this.bbox.centre().x;
        final double centerY = this.bbox.centre().y;

        final double minGeoX = centerX - destWidth / 2.0;
        final double maxGeoX = centerX + destWidth / 2.0;
        final double minGeoY = centerY - destHeight / 2.0;
        final double maxGeoY = centerY + destHeight / 2.0;

        return new BBoxMapBounds(getProjection(),
                                 minGeoX, minGeoY, maxGeoX, maxGeoY);
    }
1147306
boolean willLabelsFitInTickSpaceHint(List<String> tickLabels, int tickSpacingHint) {

    // Assume that for Y-Axis the ticks will all fit based on their tickSpace hint because the text
    // is usually horizontal and "short". This more applies to the X-Axis.
    if (this.axisDirection == Direction.Y) {
      return true;
    }

    String sampleLabel = " ";
    // find the longest String in all the labels
    for (String tickLabel : tickLabels) {
      if (tickLabel != null && tickLabel.length() > sampleLabel.length()) {
        sampleLabel = tickLabel;
      }
    }
    // System.out.println("longestLabel: " + sampleLabel);

    TextLayout textLayout =
        new TextLayout(
            sampleLabel, styler.getAxisTickLabelsFont(), new FontRenderContext(null, true, false));
    AffineTransform rot =
        styler.getXAxisLabelRotation() == 0
            ? null
            : AffineTransform.getRotateInstance(
                -1 * Math.toRadians(styler.getXAxisLabelRotation()));
    Shape shape = textLayout.getOutline(rot);
    Rectangle2D rectangle = shape.getBounds();
    double largestLabelWidth = rectangle.getWidth();
    // System.out.println("largestLabelWidth: " + largestLabelWidth);
    // System.out.println("tickSpacingHint: " + tickSpacingHint);

    // if (largestLabelWidth * 1.1 >= tickSpacingHint) {
    // System.out.println("WILL NOT FIT!!!");
    // }

    return (largestLabelWidth * 1.1 < tickSpacingHint);
  }
527678
@Override
    public void setPixelSize(final int wide, final int high)
    {
        super.setPixelSize(wide, high);

        getViewport().setPixelSize(wide, high);

        getViewport().draw();
    }