IShapeCollection
概述
IShapeCollection 是 Aspose.Slides FOSS 中用于 Java 的接口。
表示一组形状。
此接口提供了 25 个方法,用于在 Java 程序中处理 IShapeCollection 对象。可用的方法包括:addAutoShape、addConnector、addPictureFrame、addTable、asICollection、asIEnumerable、clear、get、getParentGroup、indexOf、insertAutoShape、insertConnector,以及另外 7 个方法。安装 Aspose.Slides FOSS for Java 包后,所有公共成员对任何 Java 应用程序均可访问。属性:parentGroup。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
parentGroup | IGroupShape | 读取 | 获取此集合的父组形状,如果此集合直接属于幻灯片,则返回 {@code null}。 |
方法
| 签名 | 描述 |
|---|---|
getParentGroup() → IGroupShape | 获取此集合的父组形状,如果此集合直接属于幻灯片,则返回 {@code null}。 |
asICollection() → List<IShape> | 返回此集合的不可修改 {@link List}。 |
asIEnumerable() → Iterable<IShape> | 返回此集合作为 {@link Iterable}。 |
get(index: int) → IShape | 获取指定索引处的形状。 |
size() → int | 返回集合中形状的数量。 |
addAutoShape(shapeType: ShapeType, x: double, y: double, width: double, height: double) → IAutoShape | 创建一个新的 AutoShape 并将其添加到集合中。 |
addAutoShape(shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → IAutoShape | 创建一个新的 AutoShape 并将其添加到集合中。 |
insertAutoShape(index: int, shapeType: ShapeType, x: double, y: double, width: double, height: double) → IAutoShape | 创建一个新的 AutoShape 并将其插入到指定索引位置。 |
insertAutoShape(index: int, shapeType: ShapeType, x: double, y: double, width: double, height: double, createFromTemplate: boolean) → IAutoShape | 创建一个新的 AutoShape 并将其插入到指定索引位置。 |
addConnector(shapeType: ShapeType, x: double, y: double, width: double, height: double) → IConnector | 向集合中添加连接器。 |
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 | 创建一个连接器并将其插入到指定索引位置。 |
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, shapes: IShape[]) | 将多个形状移动到指定位置。 |
removeAt(index: int) | 移除指定索引处的形状。 |
remove(shape: IShape) | 从集合中移除指定的形状。 |
clear() | 从集合中删除所有形状。 |