ShapeCollection

ShapeCollection

Overview

ShapeCollection là một lớp trong Aspose.Slides FOSS cho Java. Dòng thừa kế từ: IShapeCollection, Iterable<IShape>.

Nó đại diện cho một bộ sưu tập các hình dạng trên một slide.

Khóa học này cung cấp 42 phương pháp để làm việc với các đối tượng ShapeCollection trong các chương trình Java. Các phương pháp có sẵn bao gồm: ShapeCollection, addAutoShape, addAutoShapeImpl, addConnector, addConnectorImpl, addPictureFrame, addPictureFrameImpl, addTable, addTableImpl, asICollection, asIEnumerable, buildAutoShapeXml,+ 23 phương pháp bổ sung. Tất cả các thành viên công cộng đều có thể truy cập bất kỳ ứng dụng Java nào sau khi cài đặt Aspose.Slides FOSS cho gói Java. Tài sản : parentGroup, spTree.

Properties

NameTypeAccessDescription
spTreeElementReadNhận {@code <p:spTree>} yếu tố từ slide XML.
parentGroupIGroupShapeReadNhận nhóm cha mẹ.

Methods

SignatureDescription
ShapeCollection()tạo ra một cái trống ShapeCollection.
ShapeCollection(spTree: Element, saveCallback: Runnable)Tạo một ShapeCollection được hỗ trợ bởi các yếu tố cây hình dạng.
initInternal(spTree: Element, saveCallback: Runnable)Bước đầu với khung slide.
getSpTree()ElementNhận {@code <p:spTree>} yếu tố từ slide XML.
loadShapes()List<IShape>Tải tất cả các hình thức từ XML, sử dụng cache khi có sẵn.
invalidateCache()Tắt các hình thức cache, buộc một tải về trên truy cập tiếp theo.
save()Thay đổi liên tục đến phần nhấp chuột thông qua Save Callback.
nextShapeId()intTìm ID hình dạng tiếp theo có sẵn bằng cách quét tất cả các thuộc tính {@code id} trong spTree.
buildAutoShapeXml(shapeId: int, name: String, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)ElementXây dựng XML cho một yếu tố mới AutoShape ({@code <p:sp>}).
buildConnectorXml(shapeId: int, name: String, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)ElementXây dựng XML cho một yếu tố nối mới ({@code <p:cxnSp>}).
addAutoShapeImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)IAutoShape- Thực hiện cốt lõi để thêm hoặc nhập một AutoShape.
addConnectorImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean)IConnector- Thực hiện cốt lõi để thêm hoặc nhúng một bộ kết nối.
addPictureFrameImpl(index: Integer, shapeType: ShapeType, x: double, y: double, width: double, height: double, image: IPPImage)IPictureFrame- Thực hiện cốt lõi để thêm hoặc nhập một khung hình.
addTableImpl(index: Integer, x: double, y: double, colWidths: double[], rowHeights: double[])ITable- Thực hiện cốt lõi để thêm hoặc nhập một bảng.
reorderSingle(newIndex: int, shape: IShape)Đặt lại một hình dạng duy nhất vào vị trí mới trong spTree XML.
getParentGroup()IGroupShapeTrở lại nhóm cha mẹ.
setParentGroup(parentGroup: IGroupShape)Thiết lập hình dạng nhóm mẹ cho bộ sưu tập này.
asICollection()List<IShape>Trở lại các hình dạng như một Danh sách
asIEnumerable()Iterable<IShape>Quay lại các hình dạng như một Iterable
get(index: int)IShapeTrở lại hình dạng vào chỉ số cụ thể
size()int
iterator()Iterator<IShape>Trả lại một iterator trên các hình dạng trong bộ sưu tập này.
addAutoShape(shapeType: ShapeType, x: double, y: double, width: double, height: double)IAutoShapeThêm một AutoShape mới với loại và địa chất cụ thể
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)IAutoShapeNhập một AutoShape mới vào chỉ số với loại và địa phương cụ thể
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)IConnectorThêm một bộ kết nối mới với loại và địa chất nhất định
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)IConnectorNhập một con nối vào chỉ số với loại và địa phương cụ thể
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()

See Also

 Tiếng Việt