Package com.luciad.shape
Interface ILcdEditableComplexPolygon
- All Superinterfaces:
Cloneable,ILcdBounded,ILcdCloneable,ILcdComplexPolygon,ILcdInvalidateable,ILcdPointList,ILcdShape,Serializable
- All Known Implementing Classes:
TLcdComplexPolygon,TLcdS57Area
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 Summary
Modifier and TypeMethodDescriptionvoidaddPolygon(int aIndex, ILcdPolygon aPolygon) Inserts the specified polygon at the specified position in thisILcdComplexPolygon.voidaddPolygon(ILcdPolygon aPolygon) Appends the specified polygon to the end of thisILcdComplexPolygon.voidaddPolygons(ILcdPolygon[] aPolygon) Appends the specified array of polygons to the end of thisILcdComplexPolygon.voidRemoves all of the polygons from thisILcdComplexPolygon.voidpolygonChanged(int aIndex) Notifies thisILcdComplexPolygonthat the polygon at the specified position has changed.voidpolygonChanged(ILcdPolygon aPolygon) Notifies thisILcdComplexPolygonthat the specified polygon has changed.voidNotifies thisILcdComplexPolygonthat some (possibly all) of its polygons have changed.removePolygon(int aIndex) Removes the polygon at the specified position in thisILcdComplexPolygon.booleanremovePolygon(ILcdPolygon aPolygon) Removes the first occurrence of the specified polygon in thisILcdComplexPolygon.voidremovePolygons(ILcdPolygon[] aPolygon) Removes all polygons from thisILcdComplexPolygonthat are contained in the specified array of polygons.setPolygon(int aIndex, ILcdPolygon aPolygon) Replaces the polygon at the specified position in thisILcdComplexPolygonwith the specified polygon.voidsetPolygons(ILcdPolygon[] aPolygons) Replace the list of polygons contained in thisILcdComplexPolygonwith the specified array of polygons.Methods inherited from interface com.luciad.shape.ILcdBounded
getBoundsMethods inherited from interface com.luciad.util.ILcdCloneable
cloneMethods inherited from interface com.luciad.shape.ILcdComplexPolygon
getPolygon, getPolygonCount, getPolygonsMethods inherited from interface com.luciad.util.ILcdInvalidateable
invalidateObjectMethods inherited from interface com.luciad.shape.ILcdPointList
getPoint, getPointCount, getPointSFCT, getX, getY, getZMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains2D, contains3D, contains3D, getFocusPoint
-
Method Details
-
addPolygon
Inserts the specified polygon at the specified position in thisILcdComplexPolygon.- 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 thisILcdComplexPolygon.NullPointerException- if the specified polygon isnull.IllegalArgumentException- if some aspect of the specified polygon prevents it from being added to thisILcdComplexPolygon.IndexOutOfBoundsException- if the index is out of range (index < 0 || index > getPolygonCount()).
-
addPolygon
Appends the specified polygon to the end of thisILcdComplexPolygon.- Parameters:
aPolygon- the polygon to be appended to thisILcdComplexPolygon.- Throws:
ClassCastException- if the class of the specified polygon prevents it from being added to thisILcdComplexPolygon.NullPointerException- if the specified polygon isnull.IllegalArgumentException- if some aspect of the specified polygon prevents it from being added to thisILcdComplexPolygon.
-
addPolygons
Appends the specified array of polygons to the end of thisILcdComplexPolygon.- Parameters:
aPolygon- the array of polygons to be appended to thisILcdComplexPolygon.- Throws:
ClassCastException- if the class of one or more of the polygons in the specified array prevents it from being added to thisILcdComplexPolygon.NullPointerException- if the specified array isnull.IllegalArgumentException- if some aspect one or more of the polygons in the specified array prevents it from being added to thisILcdComplexPolygon.
-
clearPolygons
void clearPolygons()Removes all of the polygons from thisILcdComplexPolygon. -
removePolygon
Removes the polygon at the specified position in thisILcdComplexPolygon. Shifts any subsequent polygons to the left. Returns the polygon that was removed from thisILcdComplexPolygon.- 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
Removes the first occurrence of the specified polygon in thisILcdComplexPolygon. If thisILcdComplexPolygondoes not contain the polygon, it is unchanged.- Parameters:
aPolygon- the polygon to be removed, if present.- Returns:
trueif thisILcdComplexPolygoncontained the specified element.- Throws:
NullPointerException- if the specified polygon isnull.
-
removePolygons
Removes all polygons from thisILcdComplexPolygonthat are contained in the specified array of polygons.- Parameters:
aPolygon- the array of polygons to be removed from thisILcdComplexPolygon.- Throws:
NullPointerException- if the specified array isnull.
-
setPolygon
Replaces the polygon at the specified position in thisILcdComplexPolygonwith 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 thisILcdComplexPolygon.NullPointerException- if the specified polygon isnull.IllegalArgumentException- if some aspect of the specified polygon prevents it from being added to thisILcdComplexPolygon.IndexOutOfBoundsException- if the index is out of range (index < 0 || index > getPolygonCount()).
-
setPolygons
Replace the list of polygons contained in thisILcdComplexPolygonwith the specified array of polygons.- Parameters:
aPolygons- the array of polygons to be stored in thisILcdComplexPolygon.- Throws:
ClassCastException- if the class of one or more of the polygons in the specified array prevents it from being added to thisILcdComplexPolygon.NullPointerException- if the specified array isnull.IllegalArgumentException- if some aspect one or more of the polygons in the specified array prevents it from being added to thisILcdComplexPolygon.
-
polygonChanged
void polygonChanged(int aIndex) Notifies thisILcdComplexPolygonthat 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
Notifies thisILcdComplexPolygonthat the specified polygon has changed.- Parameters:
aPolygon- the polygon that has changed.
-
polygonsChanged
void polygonsChanged()Notifies thisILcdComplexPolygonthat some (possibly all) of its polygons have changed.
-