ShapeCollection

Vue de l’ensemble

‘ShapeCollection’ est une classe dans Aspose.Slides FOSS pour Java.Déduit de: IShape Collection', Iterable’.

Il représente une collection de formes sur un slide.

Cette classe fournit 42 méthodes pour travailler avec les objets ShapeCollection dans les programmes Java. Les méthodologies disponibles comprennent: Shapecollection, addAutoShapé , addAutoshapec', 'addConnector ; adConnectorImpl; adhPictureFrame : addPiktureFramme: addTables, ‘adTabless'assicollections, asICollection, aIEnumerable, buildAuteShabecxml, et 23 méthode supplémentaires. Tous les membres publics sont accessibles à toute application Java après l'installation de l’Aspoe.Slides FOSS pour le package Java . Propriétés :parentGrouptree.

Propriétés

NameTypeAccessDescription
spTreeElementReadGets the {@code <p:spTree>} element from the slide XML.
parentGroupIGroupShapeReadGets the parent group.

méthodes

SignatureDescription
ShapeCollection()Creates an empty ShapeCollection.
ShapeCollection(spTree: Element, saveCallback: Runnable)Creates a ShapeCollection backed by the given shape tree element.
initInternal(spTree: Element, saveCallback: Runnable)Internal initialization with slide context.
getSpTree()ElementGets the {@code <p:spTree>} element from the slide XML.
loadShapes()List<IShape>Loads all shapes from the XML, using the cache when available.
invalidateCache()Invalidates the shapes cache, forcing a reload on next access.
save()Persists changes to the slide part via the save callback.
nextShapeId()intFinds the next available shape ID by scanning all {@code id} attributes
in the spTree.
buildAutoShapeXml(shapeId: int, name: String, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)ElementBuilds XML for a new AutoShape ({@code <p:sp>}) element.
buildConnectorXml(shapeId: int, name: String, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)ElementBuilds XML for a new connector ({@code <p:cxnSp>}) element.
addAutoShapeImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)IAutoShapeCore implementation for adding or inserting an AutoShape.
addConnectorImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)IConnectorCore implementation for adding or inserting a connector.
addPictureFrameImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, image: IPPImage)IPictureFrameCore implementation for adding or inserting a picture frame.
addTableImpl(index: Integer, x: double, y: double, colWidths: double[], rowHeights: double[])ITableCore implementation for adding or inserting a table.
reorderSingle(newIndex: int, shape: IShape)Reorders a single shape to a new position within the spTree XML.
getParentGroup()IGroupShapeReturns the parent group.
setParentGroup(parentGroup: IGroupShape)Sets the parent group shape for this collection.
asICollection()List<IShape>Returns the shapes as a List
asIEnumerable()Iterable<IShape>Returns the shapes as an Iterable
get(index: int)IShapeReturns the shape at the specified index
size()int
iterator()Iterator<IShape>Returns an iterator over the shapes in this collection.
addAutoShape(shapeType: ShapeType, x: double, y: double, width: double, height: double)IAutoShapeAdds a new AutoShape with given type and geometry
addAutoShape(shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)IAutoShape
insertAutoShape(index: int, shapeType: ShapeType, x: double, y: double, width: double, height: double)IAutoShapeInserts a new AutoShape at index with given type and geometry
insertAutoShape(index: int, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)IAutoShape
addConnector(shapeType: ShapeType, x: double, y: double, width: double, height: double)IConnectorAdds a new connector with given type and geometry
addConnector(shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)IConnector
insertConnector(index: int, shapeType: ShapeType, x: double, y: double, width: double, height: double)IConnectorInserts a connector at index with given type and geometry
insertConnector(index: int, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)IConnector
addPictureFrame(shapeType: ShapeType, x: double, y: double, width: double, height: double, image: IPPImage)IPictureFrame
insertPictureFrame(index: int, shapeType: ShapeType, x: double, y: double, width: double, height: double, image: IPPImage)IPictureFrame
addTable(x: double, y: double, colWidths: double[], rowHeights: double[])ITable
insertTable(index: int, x: double, y: double, colWidths: double[], rowHeights: double[])ITable
indexOf(shape: IShape)int
toArray()IShape[]
toArray(startIndex: int, count: int)IShape[]
reorder(index: int, shape: IShape)
reorder(index: int, shapesToReorder: IShape[])
removeAt(index: int)
remove(shape: IShape)
clear()

Voir aussi

  • Aspose.Slides - référence API d’entreprise
 Français