public interface ILcdEditableComplexPolygon extends ILcdComplexPolygon, ILcdInvalidateable
ILcdEditableComplexPolygon
is an ILcdComplexPolygon
whose contents can be
modified. It provides methods for adding and removing polygons, and notification of polygon changes.Modifier and Type | Method and Description |
---|---|
void |
addPolygon(ILcdPolygon aPolygon)
Appends the specified polygon to the end of this
ILcdComplexPolygon . |
void |
addPolygon(int aIndex,
ILcdPolygon aPolygon)
Inserts the specified polygon at the specified position in this
ILcdComplexPolygon . |
void |
addPolygons(ILcdPolygon[] aPolygon)
Appends the specified array of polygons to the end of this
ILcdComplexPolygon . |
void |
clearPolygons()
Removes all of the polygons from this
ILcdComplexPolygon . |
void |
polygonChanged(ILcdPolygon aPolygon)
Notifies this
ILcdComplexPolygon that the specified polygon has changed. |
void |
polygonChanged(int aIndex)
Notifies this
ILcdComplexPolygon that the polygon at the specified position has changed. |
void |
polygonsChanged()
Notifies this
ILcdComplexPolygon that some (possibly all) of its polygons have changed. |
boolean |
removePolygon(ILcdPolygon aPolygon)
Removes the first occurrence of the specified polygon in this
ILcdComplexPolygon . |
ILcdPolygon |
removePolygon(int aIndex)
Removes the polygon at the specified position in this
ILcdComplexPolygon . |
void |
removePolygons(ILcdPolygon[] aPolygon)
Removes all polygons from this
ILcdComplexPolygon that are contained in the specified
array of polygons. |
ILcdPolygon |
setPolygon(int aIndex,
ILcdPolygon aPolygon)
Replaces the polygon at the specified position in this
ILcdComplexPolygon with the
specified polygon. |
void |
setPolygons(ILcdPolygon[] aPolygons)
Replace the list of polygons contained in this
ILcdComplexPolygon with the specified
array of polygons. |
getPolygon, getPolygonCount
contains2D, contains2D, contains3D, contains3D, getFocusPoint
getBounds
clone
getPoint, getPointCount, getPointSFCT, getX, getY, getZ
invalidateObject
void addPolygon(int aIndex, ILcdPolygon aPolygon)
ILcdComplexPolygon
.aIndex
- the index at which the polygon is to be inserted.aPolygon
- the polygon to be inserted.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()
).void addPolygon(ILcdPolygon aPolygon)
ILcdComplexPolygon
.aPolygon
- the polygon to be appended to this ILcdComplexPolygon
.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
.void addPolygons(ILcdPolygon[] aPolygon)
ILcdComplexPolygon
.aPolygon
- the array of polygons to be appended to this ILcdComplexPolygon
.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
.void clearPolygons()
ILcdComplexPolygon
.ILcdPolygon removePolygon(int aIndex)
ILcdComplexPolygon
. Shifts any
subsequent polygons to the left. Returns the polygon that was removed from this
ILcdComplexPolygon
.aIndex
- the index of the polygon to removed.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
size()).boolean removePolygon(ILcdPolygon aPolygon)
ILcdComplexPolygon
. If this
ILcdComplexPolygon
does not contain the polygon, it is unchanged.aPolygon
- the polygon to be removed, if present.true
if this ILcdComplexPolygon
contained the specified element.NullPointerException
- if the specified polygon is null
.void removePolygons(ILcdPolygon[] aPolygon)
ILcdComplexPolygon
that are contained in the specified
array of polygons.aPolygon
- the array of polygons to be removed from this ILcdComplexPolygon
.NullPointerException
- if the specified array is null
.ILcdPolygon setPolygon(int aIndex, ILcdPolygon aPolygon)
ILcdComplexPolygon
with the
specified polygon.aIndex
- index of polygon to replace.aPolygon
- the polygon to be stored at the specified position.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()
).void setPolygons(ILcdPolygon[] aPolygons)
ILcdComplexPolygon
with the specified
array of polygons.aPolygons
- the array of polygons to be stored in this ILcdComplexPolygon
.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
.void polygonChanged(int aIndex)
ILcdComplexPolygon
that the polygon at the specified position has changed.aIndex
- the index of the polygon that has changed.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index
> getPolygonCount()
).void polygonChanged(ILcdPolygon aPolygon)
ILcdComplexPolygon
that the specified polygon has changed.aPolygon
- the polygon that has changed.void polygonsChanged()
ILcdComplexPolygon
that some (possibly all) of its polygons have changed.