ParagraphCollection

ParagraphCollection

概述

ParagraphCollection 是 Aspose.Slides FOSS 中用于 Java 的类。继承自:BaseCollection<IParagraph>、IParagraphCollection、ISlideComponent。

表示段落的集合。

此类提供 21 个用于在 Java 程序中处理 ParagraphCollection 对象的方法。可用的方法包括:ParagraphCollection、add、asIEnumerable、asIPresentationComponent、asISlideComponent、clear、contains、count、get、getParagraphs、getPresentation、getSlide,以及另外 8 个方法。安装 Aspose.Slides FOSS for Java 包后,所有公共成员对任何 Java 应用程序均可访问。属性:paragraphs、presentation、readOnly、slide。

属性

名称类型访问描述
paragraphsList<IParagraph>读取构建并返回段落列表。
readOnlyboolean读取获取只读的。
slideIBaseSlide读取获取幻灯片。
presentationIPresentation读取获取演示文稿。

方法

签名描述
ParagraphCollection()创建一个空的 ParagraphCollection。
ParagraphCollection(paragraphs: List<IParagraph>)使用给定的初始段落创建一个 ParagraphCollection。
initInternal(txbodyElement: Element, slidePart: Object, parentSlide: IBaseSlide) → ParagraphCollection从 OOXML 文本主体元素初始化此集合。
getParagraphs() → List<IParagraph>构建并返回段落的列表。
get(index: int) → IParagraph
size() → int
count() → int返回段落的数量(size 的别名)
isReadOnly() → boolean如果只读已设置,则返回 true。
asISlideComponent() → ISlideComponent将集合返回为一个 ISlideComponent
asIEnumerable() → Iterable<IParagraph>返回一个可遍历段落的 Iterable
asIPresentationComponent() → IPresentationComponent将集合返回为一个 IPresentationComponent
getSlide() → IBaseSlide返回幻灯片。
getPresentation() → IPresentation返回演示。
add(value: IParagraph)将段落追加到集合的末尾
insert(index: int, value: IParagraph)
indexOf(item: IParagraph) → int返回给定段落的索引,如果不存在则返回 -1
contains(item: IParagraph) → boolean如果集合包含指定的段落,则返回 true
clear()
removeAt(index: int)删除给定索引处的段落
remove(item: IParagraph) → boolean删除指定的段落并返回成功状态
iterator() → Iterator<IParagraph>提供一个遍历段落的迭代器

另请参阅

 中文