ShapeCollection

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

PropertyTypeAccessDescription
spTreeElementRead/Write
parentGroupIGroupShapeRead/Write

Methods

MethodReturnsDescription
initInternal(Element spTree, Runnable saveCallback)voidInternal initialization with slide context.
getSpTree()ElementGets the <p:spTree> element from the slide XML.
loadShapes()List<IShape>Loads all shapes from the XML, using the cache when available.
invalidateCache()voidInvalidates the shapes cache, forcing a reload on next access.
save()voidPersists changes to the slide part via the save callback.
nextShapeId()intFinds 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)ElementBuilds 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)ElementBuilds XML for a new connector (<p:cxnSp>) element.
addAutoShapeImpl(Integer index, ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate)IAutoShapeCore implementation for adding or inserting an AutoShape.
addConnectorImpl(Integer index, ShapeType shapeType, double x, double y, double width, double height, boolean createFromTemplate)IConnectorCore implementation for adding or inserting a connector.
addPictureFrameImpl(Integer index, ShapeType shapeType, double x, double y, double width, double height, IPPImage image)IPictureFrameCore implementation for adding or inserting a picture frame.
addTableImpl(Integer index, double x, double y, double[] colWidths, double[] rowHeights)ITableCore implementation for adding or inserting a table.
reorderSingle(int newIndex, IShape shape)voidReorders a single shape to a new position within the spTree XML.
getParentGroup()IGroupShape
setParentGroup(IGroupShape parentGroup)voidSets 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

See Also