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

Enumerations Comment og CommentAuthor klasser repræsenterer dias-kommentarer og deres forfattere. De implementerer IComment og ICommentAuthor henholdsvis.

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)Opret en ny kommentar.

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
getText() / setText(String)StringLæs/skrivKommentartekst.
getAuthor()ICommentAuthorEnumerationsKommentarens forfatter.
getSlide()ISlideEnumerationsDias, som denne kommentar er på.
getPosition()PointFEnumerationsPosition på diaset.
getCreatedTime()LocalDateTimeEnumerationsOprettelsestidsstempel.
getParentComment()Optional<IComment>EnumerationsOverordnet kommentar for svar.
setParentComment(IComment)voidEnumerationsAngiv overordnet kommentar.

Enumerations

EnumerationsEnumerationsEnumerations
remove()voidFjern denne kommentar.

CommentAuthor

public class CommentAuthor implements ICommentAuthor

Enumerations

EnumerationsEnumerations
CommentAuthor(String name, String initials, int id)Opret en ny kommentarforfatter.

Enumerations

EnumerationsEnumerationsEnumerations
getName()StringForfatternavn.
getInitials()StringForfatterinitialer.
getId()intForfatteridentifikator.
getComments()ICommentCollectionKommentarer fra denne forfatter.

Brugseksempler

Tilføj en kommentar til et dias

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

Se også

 Dansk