ShapeCollection

ShapeCollection

Översikt

ShapeCollection är en klass i Aspose.Slides FOSS för Java. ärvt från: IShapeCollection, Iterable<IShape>.

Representerar en samling av former på en slide.

Denna klass ger 42 metoder för att arbeta med ShapeCollection objekt i Java-program. Tillgängliga metoder inkluderar: ShapeCollection, addAutoShape, addAutoShapeImpl, addConnector, addConnectorImpl, addPictureFrame, addPictureFrameImpl, addTable, addTableImpl, asICollection, asIEnumerable, buildAutoShapeXml,och 23 ytterligare metoder. Alla offentliga medlemmar är tillgängliga för alla Java-applikationer efter att ha installerat Aspose.Slides FOSS för Java paket. och egenskaper: parentGroup, spTree.

ägodelar

NamnTyp avAccessBeskrivning
spTreeElementLäsningHämtar {@code <p:spTree>}-elementet från bilden XML.
parentGroupIGroupShapeLäsningHämtar föräldragruppen.

Metoder

SignatureBeskrivning
ShapeCollection()Skapar en tom ShapeCollection.
ShapeCollection(spTree: Element, saveCallback: Runnable)Skapar en ShapeCollection som stöds av det angivna formen träelement.
initInternal(spTree: Element, saveCallback: Runnable)Internt initialisering med slide-kontext.
getSpTree() → ElementHämtar {@code <p:spTree>}-elementet från bilden XML.
loadShapes() → List<IShape>Ladda upp alla former från XML, med hjälp av cache när tillgängliga.
invalidateCache()Invaliderar cache-formarna, tvingar en omlastning på nästa åtkomst.
save()Persistera ändringar till slide delen via spara callback.
nextShapeId() → intHitta nästa tillgängliga form ID genom att skanna alla {@code id}-attribut i spTree.
buildAutoShapeXml(shapeId: int, name: String, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → ElementBygg XML för ett nytt AutoShape ({@code <p:sp>}) element.
buildConnectorXml(shapeId: int, name: String, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → ElementBygg XML för ett nytt anslutningselement ({@code <p:cxnSp>}).
addAutoShapeImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → IAutoShapeKärnimplementering för att lägga till eller infoga en AutoShape.
addConnectorImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → IConnectorKärnimplementering för att lägga till eller infoga en anslutning.
addPictureFrameImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, image: IPPImage) → IPictureFrameKärnimplementering för att lägga till eller infoga en bildram.
addTableImpl(index: Integer, x: double, y: double, colWidths: double[], rowHeights: double[]) → ITableKärnimplementering för att lägga till eller infoga en tabell.
reorderSingle(newIndex: int, shape: IShape)Omordnar en enda form till en ny position inom spTree XML.
getParentGroup() → IGroupShapeåtervänder föräldralaget.
setParentGroup(parentGroup: IGroupShape)Ställer in föräldragruppens form för den här samlingen.
asICollection() → List<IShape>Returnerar formerna som en lista
asIEnumerable() → Iterable<IShape>Återställer formerna som en icke-tätbar
get(index: int) → IShapeÅterställ form till angiven index
size() → int
iterator() → Iterator<IShape>Returnerar en iterator över formerna i denna samling.
addAutoShape(shapeType: ShapeType, x: double, y: double, width: double, height: double) → IAutoShapeLägg till en ny AutoShape med angiven typ och geometri
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) → IAutoShapeAnge en ny AutoShape i indexet med angiven typ och geometri
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) → IConnectorLägg till en ny anslutning med angiven typ och geometri
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) → IConnectorAnge en anslutning på index med angiven typ och geometri
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()

Se även

 Svenska