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
| Namn | Typ av | Access | Beskrivning |
|---|---|---|---|
spTree | Element | Läsning | Hämtar {@code <p:spTree>}-elementet från bilden XML. |
parentGroup | IGroupShape | Läsning | Hämtar föräldragruppen. |
Metoder
| Signature | Beskrivning |
|---|---|
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() → Element | Hä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() → int | Hitta 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) → Element | Bygg 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) → Element | Bygg XML för ett nytt anslutningselement ({@code <p:cxnSp>}). |
addAutoShapeImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → IAutoShape | Kä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) → IConnector | Kä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) → IPictureFrame | Kärnimplementering för att lägga till eller infoga en bildram. |
addTableImpl(index: Integer, x: double, y: double, colWidths: double[], rowHeights: double[]) → ITable | Kä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) → IAutoShape | Lä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) → IAutoShape | Ange 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) → IConnector | Lä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) → IConnector | Ange 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() |