Package com.luciad.shape
Interface ILcdEditableShapeList
- All Superinterfaces:
Cloneable,ILcdBounded,ILcdCloneable,ILcdShape,ILcdShapeList,Serializable
- All Known Implementing Classes:
TLcdAIXM51ElevatedSurface,TLcdAIXM51Surface,TLcdDataObjectShapeList,TLcdDGN3DSurface,TLcdDGNCell,TLcdDGNComplexChain,TLcdDGNComplexShape,TLcdDGNSolid,TLcdDGNTextNode2D,TLcdDWGBlock,TLcdFeaturedMultiShapeList,TLcdFeaturedShapeList,TLcdFeaturedSingleShapeList,TLcdGML2MultiPoint,TLcdGML2MultiPolygon,TLcdGML31AbstractGeometricAggregate,TLcdGML31MultiCurve,TLcdGML31MultiGeometry,TLcdGML31MultiLineString,TLcdGML31MultiPoint,TLcdGML31MultiPolygon,TLcdGML31MultiSolid,TLcdGML31MultiSurface,TLcdGML31PolyhedralSurface,TLcdGML31Surface,TLcdGML31Tin,TLcdGML31TriangulatedSurface,TLcdGML32AbstractGeometricAggregate,TLcdGML32MultiCurve,TLcdGML32MultiGeometry,TLcdGML32MultiPoint,TLcdGML32MultiSolid,TLcdGML32MultiSurface,TLcdGML32Surface,TLcdGML32Tin,TLcdKML22MultiGeometry,TLcdKML22Placemark,TLcdMIFCollection,TLcdMIFMultipoint,TLcdMIFPLine,TLcdMIFRegion,TLcdMIFText,TLcdNVG15Anchor,TLcdNVG15Composite,TLcdNVG15Group,TLcdNVG20Composite,TLcdNVG20Group,TLcdShapeList
An
ILcdEditableShapeList is an ILcdShapeList whose contents can be
modified. It provides methods for adding and removing shapes, and notification of shape changes.
Implementations may place limitations on what shapes may be added to this
ILcdShapeList. They should clearly specify in their documentation which restrictions
apply.-
Method Summary
Modifier and TypeMethodDescriptionvoidInserts the specified shape at the specified position in thisILcdShapeList.voidAppends the specified shape to the end of thisILcdShapeList.voidAppends the specified array of shapes to the end of thisILcdShapeList.voidRemoves all of the shapes from thisILcdShapeList.removeShape(int aIndex) Removes the shape at the specified position in thisILcdShapeList.booleanremoveShape(ILcdShape aShape) Removes the first occurrence of the specified shape in thisILcdShapeList.voidremoveShapes(ILcdShape[] aShape) Removes all shapes from thisILcdShapeListthat are contained in the specified array of shapes.Replaces the shape at the specified position in thisILcdShapeListwith the specified shape.voidReplace the list of shapes contained in thisILcdShapeListwith the specified array of shapes.voidshapeChanged(int aIndex) Notifies thisILcdShapeListthat the shape at the specified position has changed.voidshapeChanged(ILcdShape aShape) Notifies thisILcdShapeListthat the specified shape has changed.voidNotifies thisILcdShapeListthat some (possibly all) of its shapes have changed.Methods inherited from interface com.luciad.shape.ILcdBounded
getBoundsMethods inherited from interface com.luciad.util.ILcdCloneable
cloneMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains2D, contains3D, contains3D, getFocusPointMethods inherited from interface com.luciad.shape.ILcdShapeList
getShape, getShapeCount
-
Method Details
-
addShape
Inserts the specified shape at the specified position in thisILcdShapeList.- Parameters:
aIndex- the index at which the shape is to be inserted.aShape- the shape to be inserted.- Throws:
ClassCastException- if the class of the specified shape prevents it from being added to thisILcdShapeList.NullPointerException- if the specified shape isnull.IllegalArgumentException- if some aspect of the specified shape prevents it from being added to thisILcdShapeList.IndexOutOfBoundsException- if the index is out of range (index < 0 || index > getShapeCount()).
-
addShape
Appends the specified shape to the end of thisILcdShapeList.- Parameters:
aShape- the shape to be appended to thisILcdShapeList.- Throws:
ClassCastException- if the class of the specified shape prevents it from being added to thisILcdShapeList.NullPointerException- if the specified shape isnull.IllegalArgumentException- if some aspect of the specified shape prevents it from being added to thisILcdShapeList.
-
addShapes
Appends the specified array of shapes to the end of thisILcdShapeList.- Parameters:
aShape- the array of shapes to be appended to thisILcdShapeList.- Throws:
ClassCastException- if the class of one or more of the shapes in the specified array prevents it from being added to thisILcdShapeList.NullPointerException- if the specified array isnull.IllegalArgumentException- if some aspect one or more of the shapes in the specified array prevents it from being added to thisILcdShapeList.
-
clearShapes
void clearShapes()Removes all of the shapes from thisILcdShapeList. -
removeShape
Removes the shape at the specified position in thisILcdShapeList. Shifts any subsequent shapes to the left. Returns the shape that was removed from thisILcdShapeList.- Parameters:
aIndex- the index of the shape to removed.- Returns:
- the shape previously at the specified position.
- Throws:
IndexOutOfBoundsException- if the index is out of range (index < 0 || index >= size()).
-
removeShape
Removes the first occurrence of the specified shape in thisILcdShapeList. If thisILcdShapeListdoes not contain the shape, it is unchanged.- Parameters:
aShape- the shape to be removed, if present.- Returns:
trueif thisILcdShapeListcontained the specified element.- Throws:
NullPointerException- if the specified shape isnull.
-
removeShapes
Removes all shapes from thisILcdShapeListthat are contained in the specified array of shapes.- Parameters:
aShape- the array of shapes to be removed from thisILcdShapeList.- Throws:
NullPointerException- if the specified array isnull.
-
setShape
Replaces the shape at the specified position in thisILcdShapeListwith the specified shape.- Parameters:
aIndex- index of shape to replace.aShape- the shape to be stored at the specified position.- Returns:
- the shape previously at the specified position.
- Throws:
ClassCastException- if the class of the specified shape prevents it from being added to thisILcdShapeList.NullPointerException- if the specified shape isnull.IllegalArgumentException- if some aspect of the specified shape prevents it from being added to thisILcdShapeList.IndexOutOfBoundsException- if the index is out of range (index < 0 || index > getShapeCount()).
-
setShapes
Replace the list of shapes contained in thisILcdShapeListwith the specified array of shapes.- Parameters:
aShapes- the array of shapes to be stored in thisILcdShapeList.- Throws:
ClassCastException- if the class of one or more of the shapes in the specified array prevents it from being added to thisILcdShapeList.NullPointerException- if the specified array isnull.IllegalArgumentException- if some aspect one or more of the shapes in the specified array prevents it from being added to thisILcdShapeList.
-
shapeChanged
void shapeChanged(int aIndex) Notifies thisILcdShapeListthat the shape at the specified position has changed.- Parameters:
aIndex- the index of the shape that has changed.- Throws:
IndexOutOfBoundsException- if the index is out of range (index < 0 || index > getShapeCount()).
-
shapeChanged
Notifies thisILcdShapeListthat the specified shape has changed.- Parameters:
aShape- the shape that has changed.
-
shapesChanged
void shapesChanged()Notifies thisILcdShapeListthat some (possibly all) of its shapes have changed.
-