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

Enumerations Comment و CommentAuthor الفئات تمثل تعليقات الشرائح ومؤلفيها. إنها تنفذ IComment و ICommentAuthor على التوالي.

Enumerations: org.aspose.slides.foss

import org.aspose.slides.foss.*;

Enumerations

public class Comment implements IComment

Enumerations

EnumerationsEnumerations
Comment(String text, ICommentAuthor author, ISlide slide, PointF position, LocalDateTime createdTime)إنشاء تعليق جديد.

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
getText() / setText(String)Stringقراءة/كتابةنص التعليق.
getAuthor()ICommentAuthorEnumerationsمؤلف التعليق.
getSlide()ISlideEnumerationsالشريحة التي يوجد عليها هذا التعليق.
getPosition()PointFEnumerationsالموضع على الشريحة.
getCreatedTime()LocalDateTimeEnumerationsالطابع الزمني للإنشاء.
getParentComment()Optional<IComment>Enumerationsالتعليق الأصلي للردود.
setParentComment(IComment)voidEnumerationsتعيين التعليق الأصلي.

Enumerations

EnumerationsEnumerationsEnumerations
remove()voidإزالة هذا التعليق.

CommentAuthor

public class CommentAuthor implements ICommentAuthor

Enumerations

EnumerationsEnumerations
CommentAuthor(String name, String initials, int id)إنشاء مؤلف تعليق جديد.

Enumerations

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

انظر أيضًا

 العربية