ShapeCollection

ShapeCollection

Przegląd

ShapeCollection jest klasą w Aspose.Slides FOSS dla Java. Dziedziczy po: IShapeCollection, Iterable<IShape>.

Reprezentuje kolekcję kształtów na slajdzie.

Ta klasa udostępnia 42 metody do pracy z obiektami ShapeCollection w programach Java. Dostępne metody obejmują: ShapeCollection, addAutoShape, addAutoShapeImpl, addConnector, addConnectorImpl, addPictureFrame, addPictureFrameImpl, addTable, addTableImpl, asICollection, asIEnumerable, buildAutoShapeXml oraz 23 dodatkowe metody. Wszystkie publiczne członkowie są dostępni dla dowolnej aplikacji Java po zainstalowaniu pakietu Aspose.Slides FOSS dla Java. Właściwości: parentGroup, spTree.

Właściwości

NazwaTypDostępOpis
spTreeElementOdczytPobiera element {@code <p:spTree>} ze slajdu XML.
parentGroupIGroupShapeOdczytPobiera grupę nadrzędną.

Metody

SygnaturaOpis
ShapeCollection()Tworzy pusty ShapeCollection.
ShapeCollection(spTree: Element, saveCallback: Runnable)Tworzy ShapeCollection oparty na podanym elemencie drzewa kształtu.
initInternal(spTree: Element, saveCallback: Runnable)Wewnętrzna inicjalizacja z kontekstem slajdu.
getSpTree() → ElementPobiera element {@code <p:spTree>} ze slajdu XML.
loadShapes() → List<IShape>Ładuje wszystkie kształty z XML, używając pamięci podręcznej, gdy jest dostępna.
invalidateCache()Unieważnia pamięć podręczną kształtów, wymuszając ponowne załadowanie przy następnym dostępie.
save()Zachowuje zmiany w części slajdu poprzez save callback.
nextShapeId() → intZnajduje kolejny dostępny identyfikator kształtu, przeszukując wszystkie atrybuty {@code id} w spTree.
buildAutoShapeXml(shapeId: int, name: String, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → ElementTworzy XML dla nowego AutoShape ({@code <p:sp>}) elementu.
buildConnectorXml(shapeId: int, name: String, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → ElementTworzy XML dla nowego łącznika ({@code <p:cxnSp>}) elementu.
addAutoShapeImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → IAutoShapePodstawowa implementacja dodawania lub wstawiania AutoShape.
addConnectorImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → IConnectorPodstawowa implementacja dodawania lub wstawiania łącznika.
addPictureFrameImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, image: IPPImage) → IPictureFramePodstawowa implementacja dodawania lub wstawiania ramki obrazu.
addTableImpl(index: Integer, x: double, y: double, colWidths: double[], rowHeights: double[]) → ITablePodstawowa implementacja dodawania lub wstawiania tabeli.
reorderSingle(newIndex: int, shape: IShape)Zmienia kolejność pojedynczego kształtu, umieszczając go w nowej pozycji w drzewie spTree XML.
getParentGroup() → IGroupShapeZwraca grupę nadrzędną.
setParentGroup(parentGroup: IGroupShape)Ustawia nadrzędny kształt grupy dla tej kolekcji.
asICollection() → List<IShape>Zwraca kształty jako List
asIEnumerable() → Iterable<IShape>Zwraca kształty jako Iterable
get(index: int) → IShapeZwraca kształt o określonym indeksie
size() → int
iterator() → Iterator<IShape>Zwraca iterator po kształtach w tej kolekcji.
addAutoShape(shapeType: ShapeType, x: double, y: double, width: double, height: double) → IAutoShapeDodaje nowy AutoShape o podanym typie i geometrii
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) → IAutoShapeWstawia nowy AutoShape na indeksie z podanym typem i 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) → IConnectorDodaje nowy łącznik z podanym typem i 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) → IConnectorWstawia łącznik pod indeksem z podanym typem i 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()

Zobacz także

 Polski