ShapeCollection — Aspose.Slides FOSS Java API Reference
ShapeCollection — Represents a collection of shapes on a slide. Inherits from: IShapeCollection, Iterable<IShape>.
Package: org.aspose.slides.foss
Properties
| Property | Type | Access | Description |
|---|---|---|---|
spTree | Element | Read/Write | |
parentGroup | IGroupShape | Read/Write |
Methods
| Method | Returns | Description |
|---|---|---|
initInternal(Element spTree, Runnable saveCallback) | void | Internal initialization with slide context. |
getSpTree() | Element | Gets the <p:spTree> element from the slide XML. |
loadShapes() | List<IShape> | Loads all shapes from the XML, using the cache when available. |
invalidateCache() | void | Invalidates the shapes cache, forcing a reload on next access. |
save() | void | Persists changes to the slide part via the save callback. |
nextShapeId() | int | Finds the next available shape ID by scanning all id attributes in the spTree. |
buildAutoShapeXml(int shapeId, String name, ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate) | Element | Builds XML for a new AutoShape (<p:sp>) element. |
buildConnectorXml(int shapeId, String name, ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate) | Element | Builds XML for a new connector (<p:cxnSp>) element. |
addAutoShapeImpl(Integer index, ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate) | IAutoShape | Core implementation for adding or inserting an AutoShape. |
addConnectorImpl(Integer index, ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate) | IConnector | Core implementation for adding or inserting a connector. |
addPictureFrameImpl(Integer index, ShapeType shapeType, double x, double y, double width, double height, IPPImage image) | IPictureFrame | Core implementation for adding or inserting a picture frame. |
addTableImpl(Integer index, double x, double y, double[] colWidths, double[] rowHeights) | ITable | Core implementation for adding or inserting a table. |
reorderSingle(int newIndex, IShape shape) | void | Reorders a single shape to a new position within the spTree XML. |
getParentGroup() | IGroupShape | |
setParentGroup(IGroupShape parentGroup) | void | Sets the parent group shape for this collection. |
asICollection() | List<IShape> | |
asIEnumerable() | Iterable<IShape> | |
get(int index) | IShape | |
size() | int | |
iterator() | Iterator<IShape> | Returns an iterator over the shapes in this collection. |
addAutoShape(ShapeType shapeType, double x, double y, double width, double height) | IAutoShape | |
addAutoShape(ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate) | IAutoShape | |
insertAutoShape(int index, ShapeType shapeType, double x, double y, double width, double height) | IAutoShape | |
insertAutoShape(int index, ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate) | IAutoShape | |
addConnector(ShapeType shapeType, double x, double y, double width, double height) | IConnector | |
addConnector(ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate) | IConnector | |
insertConnector(int index, ShapeType shapeType, double x, double y, double width, double height) | IConnector | |
insertConnector(int index, ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate) | IConnector | |
addPictureFrame(ShapeType shapeType, double x, double y, double width, double height, IPPImage image) | IPictureFrame | |
insertPictureFrame(int index, ShapeType shapeType, double x, double y, double width, double height, IPPImage image) | IPictureFrame | |
addTable(double x, double y, double[] colWidths, double[] rowHeights) | ITable | |
insertTable(int index, double x, double y, double[] colWidths, double[] rowHeights) | ITable | |
indexOf(IShape shape) | int | |
toArray() | IShape[] | |
toArray(int startIndex, int count) | IShape[] | |
reorder(int index, IShape shape) | void | |
reorder(int index, IShape[] shapesToReorder) | void | |
removeAt(int index) | void | |
remove(IShape shape) | void | |
clear() | void |