Interface ILcdEditableComplexPolygon

All Superinterfaces:
Cloneable, ILcdBounded, ILcdCloneable, ILcdComplexPolygon, ILcdInvalidateable, ILcdPointList, ILcdShape, Serializable
All Known Implementing Classes:
TLcdComplexPolygon, TLcdS57Area

public interface ILcdEditableComplexPolygon extends ILcdComplexPolygon, ILcdInvalidateable
An ILcdEditableComplexPolygon is an ILcdComplexPolygon whose contents can be modified. It provides methods for adding and removing polygons, and notification of polygon changes.
Since:
10.1
  • Method Details

    • addPolygon

      void addPolygon(int aIndex, ILcdPolygon aPolygon)
      Inserts the specified polygon at the specified position in this ILcdComplexPolygon.
      Parameters:
      aIndex - the index at which the polygon is to be inserted.
      aPolygon - the polygon to be inserted.
      Throws:
      ClassCastException - if the class of the specified polygon prevents it from being added to this ILcdComplexPolygon.
      NullPointerException - if the specified polygon is null.
      IllegalArgumentException - if some aspect of the specified polygon prevents it from being added to this ILcdComplexPolygon.
      IndexOutOfBoundsException - if the index is out of range (index < 0 || index > getPolygonCount()).
    • addPolygon

      void addPolygon(ILcdPolygon aPolygon)
      Appends the specified polygon to the end of this ILcdComplexPolygon.
      Parameters:
      aPolygon - the polygon to be appended to this ILcdComplexPolygon.
      Throws:
      ClassCastException - if the class of the specified polygon prevents it from being added to this ILcdComplexPolygon.
      NullPointerException - if the specified polygon is null.
      IllegalArgumentException - if some aspect of the specified polygon prevents it from being added to this ILcdComplexPolygon.
    • addPolygons

      void addPolygons(ILcdPolygon[] aPolygon)
      Appends the specified array of polygons to the end of this ILcdComplexPolygon.
      Parameters:
      aPolygon - the array of polygons to be appended to this ILcdComplexPolygon.
      Throws:
      ClassCastException - if the class of one or more of the polygons in the specified array prevents it from being added to this ILcdComplexPolygon.
      NullPointerException - if the specified array is null.
      IllegalArgumentException - if some aspect one or more of the polygons in the specified array prevents it from being added to this ILcdComplexPolygon.
    • clearPolygons

      void clearPolygons()
      Removes all of the polygons from this ILcdComplexPolygon.
    • removePolygon

      ILcdPolygon removePolygon(int aIndex)
      Removes the polygon at the specified position in this ILcdComplexPolygon. Shifts any subsequent polygons to the left. Returns the polygon that was removed from this ILcdComplexPolygon.
      Parameters:
      aIndex - the index of the polygon to removed.
      Returns:
      the polygon previously at the specified position.
      Throws:
      IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).
    • removePolygon

      boolean removePolygon(ILcdPolygon aPolygon)
      Removes the first occurrence of the specified polygon in this ILcdComplexPolygon. If this ILcdComplexPolygon does not contain the polygon, it is unchanged.
      Parameters:
      aPolygon - the polygon to be removed, if present.
      Returns:
      true if this ILcdComplexPolygon contained the specified element.
      Throws:
      NullPointerException - if the specified polygon is null.
    • removePolygons

      void removePolygons(ILcdPolygon[] aPolygon)
      Removes all polygons from this ILcdComplexPolygon that are contained in the specified array of polygons.
      Parameters:
      aPolygon - the array of polygons to be removed from this ILcdComplexPolygon.
      Throws:
      NullPointerException - if the specified array is null.
    • setPolygon

      ILcdPolygon setPolygon(int aIndex, ILcdPolygon aPolygon)
      Replaces the polygon at the specified position in this ILcdComplexPolygon with the specified polygon.
      Parameters:
      aIndex - index of polygon to replace.
      aPolygon - the polygon to be stored at the specified position.
      Returns:
      the polygon previously at the specified position.
      Throws:
      ClassCastException - if the class of the specified polygon prevents it from being added to this ILcdComplexPolygon.
      NullPointerException - if the specified polygon is null.
      IllegalArgumentException - if some aspect of the specified polygon prevents it from being added to this ILcdComplexPolygon.
      IndexOutOfBoundsException - if the index is out of range (index < 0 || index > getPolygonCount()).
    • setPolygons

      void setPolygons(ILcdPolygon[] aPolygons)
      Replace the list of polygons contained in this ILcdComplexPolygon with the specified array of polygons.
      Parameters:
      aPolygons - the array of polygons to be stored in this ILcdComplexPolygon.
      Throws:
      ClassCastException - if the class of one or more of the polygons in the specified array prevents it from being added to this ILcdComplexPolygon.
      NullPointerException - if the specified array is null.
      IllegalArgumentException - if some aspect one or more of the polygons in the specified array prevents it from being added to this ILcdComplexPolygon.
    • polygonChanged

      void polygonChanged(int aIndex)
      Notifies this ILcdComplexPolygon that the polygon at the specified position has changed.
      Parameters:
      aIndex - the index of the polygon that has changed.
      Throws:
      IndexOutOfBoundsException - if the index is out of range (index < 0 || index > getPolygonCount()).
    • polygonChanged

      void polygonChanged(ILcdPolygon aPolygon)
      Notifies this ILcdComplexPolygon that the specified polygon has changed.
      Parameters:
      aPolygon - the polygon that has changed.
    • polygonsChanged

      void polygonsChanged()
      Notifies this ILcdComplexPolygon that some (possibly all) of its polygons have changed.