/** * Sets the display area in screen (window, image) coordinates. * * @param screenArea display area in screen coordinates (may be {@code null}) */ public void setScreenArea(Rectangle screenArea) { lock.writeLock().lock(); try { if (checkEditable("setScreenArea")) { doSetScreenArea(screenArea); } } finally { lock.writeLock().unlock(); } }
/** * Sets whether to adjust input world bounds to match the aspect ratio of the screen area. * * @param enabled whether to enable aspect ratio adjustment */ public void setMatchingAspectRatio(boolean enabled) { lock.writeLock().lock(); try { if (checkEditable("setMatchingAspectRatio")) { if (enabled != matchingAspectRatio) { matchingAspectRatio = enabled; setTransforms(true); } } } finally { lock.writeLock().unlock(); } }
/** * Sets the display area in world coordinates. * * <p>If {@code bounds} is {@code null} or empty, default identity coordinate transforms will be * set. * * <p>If {@code bounds} is not empty, and aspect ratio matching is enabled, the coordinate * transforms will be calculated to centre the requested bounds in the current screen area (if * defined), after which the world bounds will be adjusted (enlarged) as required to match the * screen area's aspect ratio. * * <p>A {@code MapBoundsEvent} will be fired to inform listeners of the change from old to new * bounds. Note that when aspect ratio matching is enabled, the new bounds carried by the event * will be the viewport's adjusted bounds, not the originally requested bounds. * * @param requestedBounds the requested bounds (may be {@code null}) */ public void setBounds(ReferencedEnvelope requestedBounds) { lock.writeLock().lock(); try { if (checkEditable("setBounds")) { ReferencedEnvelope old = bounds; copyBounds(requestedBounds); setTransforms(true); fireMapBoundsListenerMapBoundsChanged(Type.BOUNDS, old, bounds); } } finally { lock.writeLock().unlock(); } }
lock.writeLock().lock(); try { if (checkEditable("setCoordinateReferenceSystem")) { if (crs == null) { bounds = new ReferencedEnvelope(bounds, null);
/** * Sets the display area in screen (window, image) coordinates. * * @param screenArea display area in screen coordinates (may be {@code null}) */ public void setScreenArea(Rectangle screenArea) { lock.writeLock().lock(); try { if (checkEditable("setScreenArea")) { doSetScreenArea(screenArea); } } finally { lock.writeLock().unlock(); } }
/** * Sets whether to adjust input world bounds to match the aspect * ratio of the screen area. * * @param enabled whether to enable aspect ratio adjustment */ public void setMatchingAspectRatio(boolean enabled) { lock.writeLock().lock(); try { if (checkEditable("setMatchingAspectRatio")) { if (enabled != matchingAspectRatio) { matchingAspectRatio = enabled; setTransforms(true); } } } finally { lock.writeLock().unlock(); } }
lock.writeLock().lock(); try { if (checkEditable("setBounds")) { ReferencedEnvelope old = bounds; copyBounds(requestedBounds);
lock.writeLock().lock(); try { if (checkEditable("setCoordinateReferenceSystem")) { if (crs == null) { bounds = new ReferencedEnvelope(bounds, null);