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

ColladaSaveOptions Comment و CommentAuthor کلاس‌ها نمایانگر نظرات اسلاید و نویسندگان آن‌ها هستند. آن‌ها پیاده‌سازی می‌کنند IComment و ICommentAuthor به ترتیب.

ColladaSaveOptions: org.aspose.slides.foss

import org.aspose.slides.foss.*;

ColladaSaveOptions

public class Comment implements IComment

ColladaSaveOptions

ColladaSaveOptionsColladaSaveOptions
Comment(String text, ICommentAuthor author, ISlide slide, PointF position, LocalDateTime createdTime)یک نظر جدید ایجاد کنید.

ColladaSaveOptions

ColladaSaveOptionsColladaSaveOptionsColladaSaveOptionsColladaSaveOptions
getText() / setText(String)Stringخواندن/نوشتنمتن نظر.
getAuthor()ICommentAuthorColladaSaveOptionsنویسندهٔ نظر.
getSlide()ISlideColladaSaveOptionsاسلایدی که این نظر بر روی آن است.
getPosition()PointFColladaSaveOptionsموقعیت در اسلاید.
getCreatedTime()LocalDateTimeColladaSaveOptionsزمان ایجاد.
getParentComment()Optional<IComment>ColladaSaveOptionsنظر والد برای پاسخ‌ها.
setParentComment(IComment)voidColladaSaveOptionsتنظیم نظر والد.

ColladaSaveOptions

ColladaSaveOptionsColladaSaveOptionsColladaSaveOptions
remove()voidحذف این نظر.

CommentAuthor

public class CommentAuthor implements ICommentAuthor

ColladaSaveOptions

ColladaSaveOptionsColladaSaveOptions
CommentAuthor(String name, String initials, int id)ایجاد نویسندهٔ جدید برای نظر.

ColladaSaveOptions

ColladaSaveOptionsColladaSaveOptionsColladaSaveOptions
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);

همچنین ببینید

 فارسی