Class ALcd2DEditableBounds

java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.ALcdBounds
com.luciad.shape.shape2D.ALcd2DEditableBounds
All Implemented Interfaces:
ILcdBounded, ILcdBounds, ILcdShape, ILcd2DEditableBounds, ILcd2DEditableShape, ILcdCloneable, Serializable, Cloneable
Direct Known Subclasses:
ALcd3DEditableBounds, TLcdLonLatBounds, TLcdLonLatFloatBounds, TLcdXYBounds, TLcdXYFloatBounds

public abstract class ALcd2DEditableBounds extends ALcdBounds implements ILcd2DEditableBounds
This abstract class provides a basis for implementing the ILcd2DEditableBounds interface.

This class is thread-safe for concurrent read-only access of its contents. For read-write access, external locking must be used. Such locking is typically done at the model level.

This class can also manage the defined flag of ILcdBounds. By default, bounds are defined, but you can change that with setDefined(boolean).

See Also:
  • Constructor Details

    • ALcd2DEditableBounds

      public ALcd2DEditableBounds()
  • Method Details

    • move2D

      public void move2D(ILcdPoint aPoint)
      Description copied from interface: ILcd2DEditableBounds
      Moves this ILcd2DEditableShape to the given point in the 2D space. The focus point is used as the handle by which the shape is moved. Only the first two dimensions of the ILcdShape and the ILcdPoint are considered. The third dimension is left unchanged.

      If this bounds was undefined, it becomes defined after the move.

      Specified by:
      move2D in interface ILcd2DEditableBounds
      Specified by:
      move2D in interface ILcd2DEditableShape
      Parameters:
      aPoint - the ILcdPoint to move to.
      See Also:
    • translate2D

      public void translate2D(double aDeltaX, double aDeltaY)
      Description copied from interface: ILcd2DEditableBounds
      Translates this ILcd2DEditableShape from its current position over the given translation vector in the 2D space. Only the first two dimensions of the ILcdShape are considered. The third dimension is left unchanged.

      If this bounds was undefined, it becomes defined after the translation.

      Specified by:
      translate2D in interface ILcd2DEditableBounds
      Specified by:
      translate2D in interface ILcd2DEditableShape
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
    • isDefined

      public final boolean isDefined()
      Indicates whether this bounds object is valid.
      • If true, this bounds describes a valid geographic region.
      • If false, this bounds does not represent a geographic region, and its location, width, height and depth should not be used.

      Specified by:
      isDefined in interface ILcdBounds
      Returns:
      true if this object describes actual bounds, false if not
      See Also:
    • setDefined

      public final void setDefined(boolean aDefined)
      Indicate whether this bounds object is valid or not.
      Parameters:
      aDefined - Whether this bounds object is valid or not.
      See Also:
    • getDepth

      public double getDepth()
      Description copied from interface: ILcdBounds
      Returns the depth of the bounding box. The depth has to be larger than or equal to 0.
      Specified by:
      getDepth in interface ILcdBounds
      Returns:
      0.
    • setTo2DIntersection

      public void setTo2DIntersection(ILcdBounds aBounds)
      Calculates the 2D intersection of this ALcd2DEditableBounds and a given ILcdBounds in the cartesian plane.
      Specified by:
      setTo2DIntersection in interface ILcd2DEditableBounds
      Parameters:
      aBounds - the other ILcdBounds operand for the intersection.
      See Also:
    • setTo2DIntersection

      public void setTo2DIntersection(double aX, double aY, double aWidth, double aHeight)
      Calculates the 2D intersection of this ALcd2DEditableBounds and a given rectangle in the cartesian plane.
      Specified by:
      setTo2DIntersection in interface ILcd2DEditableBounds
      Parameters:
      aX - the x coordinate of the rectangle.
      aY - the y coordinate of the rectangle.
      aWidth - the width of the rectangle.
      aHeight - the height of the rectangle.
    • setTo2DUnion

      public void setTo2DUnion(ILcdBounds aBounds)
      Calculates the 2D union of this ALcd2DEditableBounds and a given ILcdBounds in the cartesian plane.
      Specified by:
      setTo2DUnion in interface ILcd2DEditableBounds
      Parameters:
      aBounds - the other ILcdBounds operand for the union.
      See Also:
    • setTo2DUnion

      public void setTo2DUnion(double aX, double aY, double aWidth, double aHeight)
      Calculates the 2D union of this ALcd2DEditableBounds and a given rectangle in the cartesian plane.
      Specified by:
      setTo2DUnion in interface ILcd2DEditableBounds
      Parameters:
      aX - the x coordinate of the rectangle.
      aY - the y coordinate of the rectangle.
      aWidth - the width of the rectangle.
      aHeight - the height of the rectangle.
    • setToIncludePoint2D

      public void setToIncludePoint2D(ILcdPoint aPoint)
      Calculates the 2D extension of this ILcd2DEditableBounds object that contains a given ILcdPoint, in the cartesian plane.
      Specified by:
      setToIncludePoint2D in interface ILcd2DEditableBounds
      Parameters:
      aPoint - the point that should be inside (or at the edge) after the extension of the bounds.
      See Also:
    • setToIncludePoint2D

      public void setToIncludePoint2D(double aX, double aY)
      Calculates the 2D extension of this ILcd2DEditableBounds object that contains a given point, in the cartesian plane.
      Specified by:
      setToIncludePoint2D in interface ILcd2DEditableBounds
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
    • toString

      public String toString()
      Overrides:
      toString in class Object