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 Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • 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

      @Nullable public Bounds getBounds()
      Returns the bounds constraining the camera.
      Returns:
      the bounds constraining the camera.
      See Also:
    • setBounds

      public void setBounds(@NotNull Bounds bounds)
      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.