Package com.luciad.maps
Class MapNavigator.BoundsConstraintOptions
java.lang.Object
com.luciad.maps.MapNavigator.BoundsConstraintOptions
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
MapNavigator
public static final class MapNavigator.BoundsConstraintOptions
extends Object
implements AutoCloseable
Options to configure the constraint to restrict the navigation to specific bounds.
See MapNavigator#getBoundsConstraint for more information.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()Returns the bounds constraining the camera.doubleReturns the padding that is added to the bounds constraint options.booleanReturns whether the constraint is enabled.voidSets the bounds constraining the camera.voidsetEnabled(boolean enabled) Sets whether the constraint is enabled.voidsetPadding(double padding) Sets the padding that is added to the bounds constraint options.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
isEnabled
public boolean isEnabled()Returns whether the constraint is enabled.- Returns:
- whether the constraint is enabled.
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the constraint is enabled.The default is true.
- Parameters:
enabled- true to enable the constraint or false to disable it
-
getBounds
Returns the bounds constraining the camera.- Returns:
- the bounds constraining the camera.
- See Also:
-
setBounds
Sets the bounds constraining the camera.The default value is
null.- Parameters:
bounds- the bounds to constrain the main camera.
-
getPadding
public double getPadding()Returns the padding that is added to the bounds constraint options.- Returns:
- the additional padding (in device independent pixels) that is added to the bounds.
- See Also:
-
setPadding
public void setPadding(double padding) Sets the padding that is added to the bounds constraint options.The padding is expressed in device independent pixels. It is applied to the
bounds.This can for example be useful to make sure lines (with a pixel-sized width) or labels (with a pixel width/height), can still be displayed.
The default is 0.
- Parameters:
padding- the padding that is added to the bounds.
-