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 TypeMethodDescriptionvoid
addPolygon
(int aIndex, ILcdPolygon aPolygon) Inserts the specified polygon at the specified position in thisILcdComplexPolygon
.void
addPolygon
(ILcdPolygon aPolygon) Appends the specified polygon to the end of thisILcdComplexPolygon
.void
addPolygons
(ILcdPolygon[] aPolygon) Appends the specified array of polygons to the end of thisILcdComplexPolygon
.void
Removes all of the polygons from thisILcdComplexPolygon
.void
polygonChanged
(int aIndex) Notifies thisILcdComplexPolygon
that the polygon at the specified position has changed.void
polygonChanged
(ILcdPolygon aPolygon) Notifies thisILcdComplexPolygon
that the specified polygon has changed.void
Notifies thisILcdComplexPolygon
that some (possibly all) of its polygons have changed.removePolygon
(int aIndex) Removes the polygon at the specified position in thisILcdComplexPolygon
.boolean
removePolygon
(ILcdPolygon aPolygon) Removes the first occurrence of the specified polygon in thisILcdComplexPolygon
.void
removePolygons
(ILcdPolygon[] aPolygon) Removes all polygons from thisILcdComplexPolygon
that are contained in the specified array of polygons.setPolygon
(int aIndex, ILcdPolygon aPolygon) Replaces the polygon at the specified position in thisILcdComplexPolygon
with the specified polygon.void
setPolygons
(ILcdPolygon[] aPolygons) Replace the list of polygons contained in thisILcdComplexPolygon
with the specified array of polygons.Methods inherited from interface com.luciad.shape.ILcdBounded
getBounds
Methods inherited from interface com.luciad.util.ILcdCloneable
clone
Methods inherited from interface com.luciad.shape.ILcdComplexPolygon
getPolygon, getPolygonCount
Methods inherited from interface com.luciad.util.ILcdInvalidateable
invalidateObject
Methods inherited from interface com.luciad.shape.ILcdPointList
getPoint, getPointCount, getPointSFCT, getX, getY, getZ
Methods 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 thisILcdComplexPolygon
does not contain the polygon, it is unchanged.- Parameters:
aPolygon
- the polygon to be removed, if present.- Returns:
true
if thisILcdComplexPolygon
contained the specified element.- Throws:
NullPointerException
- if the specified polygon isnull
.
-
removePolygons
Removes all polygons from thisILcdComplexPolygon
that 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 thisILcdComplexPolygon
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 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 thisILcdComplexPolygon
with 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 thisILcdComplexPolygon
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
Notifies thisILcdComplexPolygon
that the specified polygon has changed.- Parameters:
aPolygon
- the polygon that has changed.
-
polygonsChanged
void polygonsChanged()Notifies thisILcdComplexPolygon
that some (possibly all) of its polygons have changed.
-