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

Enumerations Comment a CommentAuthor třídy představují komentáře ke snímkům a jejich autory. Implementují IComment a ICommentAuthor odpovídajícím způsobem.

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)Vytvořit nový komentář.

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
getText() / setText(String)StringČíst/ZapisovatText komentáře.
getAuthor()ICommentAuthorEnumerationsAutor komentáře.
getSlide()ISlideEnumerationsSnímek, na kterém je tento komentář.
getPosition()PointFEnumerationsPozice na snímku.
getCreatedTime()LocalDateTimeEnumerationsČasové razítko vytvoření.
getParentComment()Optional<IComment>EnumerationsNadřazený komentář pro odpovědi.
setParentComment(IComment)voidEnumerationsNastavit nadřazený komentář.

Enumerations

EnumerationsEnumerationsEnumerations
remove()voidOdstranit tento komentář.

CommentAuthor

public class CommentAuthor implements ICommentAuthor

Enumerations

EnumerationsEnumerations
CommentAuthor(String name, String initials, int id)Vytvořit nového autora komentáře.

Enumerations

EnumerationsEnumerationsEnumerations
getName()StringJméno autora.
getInitials()StringIniciály autora.
getId()intIdentifikátor autora.
getComments()ICommentCollectionKomentáře tohoto autora.

Příklady použití

Přidat komentář do snímku

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

Viz také

 Čeština