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

Enumerations Comment und CommentAuthor Klassen repräsentieren Folienkommentare und deren Autoren. Sie implementieren IComment und ICommentAuthor jeweils.

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)Erstelle einen neuen Kommentar.

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
getText() / setText(String)StringLesen/SchreibenKommentartext.
getAuthor()ICommentAuthorEnumerationsDer Kommentarautor.
getSlide()ISlideEnumerationsFolie, auf der dieser Kommentar ist.
getPosition()PointFEnumerationsPosition auf der Folie.
getCreatedTime()LocalDateTimeEnumerationsErstellungszeitstempel.
getParentComment()Optional<IComment>EnumerationsÜbergeordneter Kommentar für Antworten.
setParentComment(IComment)voidEnumerationsÜbergeordneten Kommentar festlegen.

Enumerations

EnumerationsEnumerationsEnumerations
remove()voidDiesen Kommentar entfernen.

CommentAuthor

public class CommentAuthor implements ICommentAuthor

Enumerations

EnumerationsEnumerations
CommentAuthor(String name, String initials, int id)Neuen Kommentarautor erstellen.

Enumerations

EnumerationsEnumerationsEnumerations
getName()StringAutorname.
getInitials()StringAutorinitialen.
getId()intAutorkennung.
getComments()ICommentCollectionKommentare dieses Autors.

Anwendungsbeispiele

Einen Kommentar zu einer Folie hinzufügen

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

Siehe auch

 Deutsch