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

BoundingBoxExtent Comment dan CommentAuthor kelas mewakili komentar slide dan penulisnya. Mereka mengimplementasikan IComment dan ICommentAuthor masing-masing.

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)Buat komentar baru.

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
getText() / setText(String)StringBaca/TulisTeks komentar.
getAuthor()ICommentAuthorBoundingBoxExtentPenulis komentar.
getSlide()ISlideBoundingBoxExtentSlide tempat komentar ini berada.
getPosition()PointFBoundingBoxExtentPosisi pada slide.
getCreatedTime()LocalDateTimeBoundingBoxExtentStempel waktu pembuatan.
getParentComment()Optional<IComment>BoundingBoxExtentKomentar induk untuk balasan.
setParentComment(IComment)voidBoundingBoxExtentAtur komentar induk.

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
remove()voidHapus komentar ini.

CommentAuthor

public class CommentAuthor implements ICommentAuthor

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtent
CommentAuthor(String name, String initials, int id)Buat penulis komentar baru.

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
getName()StringNama penulis.
getInitials()StringInisial penulis.
getId()intPengidentifikasi penulis.
getComments()ICommentCollectionKomentar oleh penulis ini.

Contoh Penggunaan

Tambahkan Komentar ke Slide

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

Lihat Juga

 Bahasa Indonesia