CommentCollection

CommentCollection

概述

CommentCollection 是 Aspose.Slides FOSS 中用于 Java 的类。继承自:ICommentCollection。

表示单个作者的评论集合。

此类提供 20 个用于在 Java 程序中处理 CommentCollection 对象的方法。可用的方法包括:CommentCollection、addComment、asICollection、asIEnumerable、buildComment、clear、collectMyComments、findCommentByIdx、get、getAllCommentsParts、getAuthorObj、getOrCreateCommentsPart,以及另外 7 个方法。所有公共成员在安装 Aspose.Slides FOSS for Java 包后,对任何 Java 应用程序均可访问。属性:allCommentsParts、authorObj。

属性

名称类型访问描述
authorObjICommentAuthor读取从后备作者数据解析拥有的 {@link ICommentAuthor} 对象。
allCommentsPartsList<CommentsPartEntry>读取返回所有包含此作者评论的幻灯片中的 {@link CommentsPart} 实例。

方法

签名描述
CommentCollection(author: ICommentAuthor)为给定的作者创建一个评论集合。
initInternal(authorData: AuthorData, authorsPart: CommentAuthorsPart, pkg: OpcPackage, presentation: Presentation)使用包级别的后备数据初始化此集合。
resolveSlide(partName: String) → ISlide返回{@link ISlide},其部件名称与给定的部件名称匹配,若不存在则返回{@code null}。
getAuthorObj() → ICommentAuthor从后备作者数据中解析拥有的{@link ICommentAuthor}对象。
getAllCommentsParts() → List<CommentsPartEntry>返回所有在所有幻灯片中包含该作者评论的{@link CommentsPart}实例。
getOrCreateCommentsPart(slidePartName: String) → CommentsPart获取或创建给定幻灯片部件名称对应的 {@link CommentsPart}。
buildComment(data: CommentData, cp: CommentsPart, slideObj: ISlide) → Comment从原始评论数据、评论部件以及可选的幻灯片构建 {@link Comment}。
collectMyComments() → List<MyCommentEntry>收集该作者在包中所有幻灯片上的所有评论。
addComment(text: String, slide: ISlide, position: PointF, createdTime: LocalDateTime) → IComment添加一条包含文本、幻灯片、位置和创建时间的新评论,返回 IComment
insertComment(index: int, text: String, slide: ISlide, position: PointF, createdTime: LocalDateTime) → IComment在给定索引处插入带有指定细节的评论,返回 IComment
removeAt(index: int)删除指定索引处的评论
remove(comment: IComment)从集合中删除指定的 IComment
clear()从集合中删除所有评论
get(index: int) → IComment返回给定索引处的IComment
size() → int返回集合中评论的数量
toArray() → IComment[]返回一个子数组,包含从 startIndex 开始的 count 个评论
toArray(startIndex: int, count: int) → IComment[]
asICollection() → List<IComment>返回评论作为 List
asIEnumerable() → Iterable<IComment>返回评论作为 Iterable
findCommentByIdx(idx: int) → Optional<IComment>返回一个 Optional,其中包含给定索引处的评论(如果存在)

另请参阅

 中文