Comments

Comment / CommentAuthor — Aspose.Slides FOSS for Java API Reference

BoundingBoxExtent Comment および CommentAuthor クラスはスライドコメントとその作者を表します。これらは実装します。 IComment および ICommentAuthor それぞれ。.

BoundingBoxExtent: org.aspose.slides.foss

import org.aspose.slides.foss.*;

BoundingBoxExtent

public class Comment implements IComment

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtent
Comment(String text, ICommentAuthor author, ISlide slide, PointF position, LocalDateTime createdTime)新しいコメントを作成します。.

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
getText() / setText(String)String読み取り/書き込みコメントテキスト。.
getAuthor()ICommentAuthorBoundingBoxExtentコメントの作者。.
getSlide()ISlideBoundingBoxExtentこのコメントがあるスライド。.
getPosition()PointFBoundingBoxExtentスライド上の位置。.
getCreatedTime()LocalDateTimeBoundingBoxExtent作成タイムスタンプ。.
getParentComment()Optional<IComment>BoundingBoxExtent返信用の親コメント。.
setParentComment(IComment)voidBoundingBoxExtent親コメントを設定する。.

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
remove()voidこのコメントを削除する。.

CommentAuthor

public class CommentAuthor implements ICommentAuthor

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtent
CommentAuthor(String name, String initials, int id)新しいコメント作者を作成する。.

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
getName()String作者名。.
getInitials()String作者イニシャル。.
getId()int作者識別子。.
getComments()ICommentCollectionこの作者によるコメント。.

使用例

スライドにコメントを追加する

import org.aspose.slides.foss.*;
import java.time.LocalDateTime;

Presentation prs = new Presentation();
ICommentAuthorCollection authors = prs.getCommentAuthors();
ICommentAuthor author = authors.addAuthor("John", "J");

ISlide slide = prs.getSlides().get(0);
slide.getSlideComments(null); // read existing comments

// Add comment via the author's comment collection
author.getComments().addComment(
    "Review this slide", slide, new PointF(100, 100), LocalDateTime.now());

prs.save("commented.pptx", SaveFormat.PPTX);

参照

 日本語