ICommentCollection

All Implemented Interfaces: com.aspose.slides.IGenericCollection

public interface ICommentCollection extends IGenericCollection<IComment>

Represents a collection of comments of one author.

Methods

MethodDescription
get_Item(int index)Gets the element at the specified index.
addComment(String text, ISlide slide, PointF position, Date creationTime)Add new comment at the end of a collection.
addModernComment(String text, ISlide slide, IShape shape, PointF position, Date creationTime)Add new modern comment at the end of a collection.
insertComment(int index, String text, ISlide slide, PointF position, Date creationTime)Insert new comment to a collection at the specified index.
insertModernComment(int index, String text, ISlide slide, IShape shape, PointF position, Date creationTime)Insert new modern comment to a collection at the specified index.
toArray()Creates and returns an array with all comments.
toArray(int startIndex, int count)Creates and returns an array with all comments from the specified range.
removeAt(int index)Removes the element at the specified index in a collection.
remove(IComment comment)Removes the first occurrence of the specified comment in a collection.
clear()Removes all comments from a collection.

get_Item(int index)

public abstract IComment get_Item(int index)

Gets the element at the specified index. Read-only IComment.

Parameters:

ParameterTypeDescription
indexint

Returns: IComment

addComment(String text, ISlide slide, PointF position, Date creationTime)

public abstract IComment addComment(String text, ISlide slide, PointF position, Date creationTime)

Add new comment at the end of a collection.

Parameters:

ParameterTypeDescription
textjava.lang.StringPlain text of a new comment.
slideISlideSlide in a presentation where to add a new comment.
positionandroid.graphics.PointFPosition on a slide where to add a new comment.
creationTimejava.util.DateTime of a comment creation.

Returns: IComment - Added comment.

addModernComment(String text, ISlide slide, IShape shape, PointF position, Date creationTime)

public abstract IModernComment addModernComment(String text, ISlide slide, IShape shape, PointF position, Date creationTime)

Add new modern comment at the end of a collection.


Presentation pres = new Presentation();
 try {
     ICommentAuthor newAuthor = pres.getCommentAuthors().addAuthor("Some Author", "SA");
     newAuthor.getComments().addModernComment("This is modern comment", pres.getSlides().get_Item(0), null, new android.graphics.PointF(100, 100), new Date());
     pres.save(outPptxFileName, SaveFormat.Pptx);
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
textjava.lang.StringPlain text of a new modern comment.
slideISlideSlide in a presentation where to add a new modern comment.
shapeIShapeShape on a slide to which a new modern comment is associated.
positionandroid.graphics.PointFPosition on a slide where to add a new modern comment.
creationTimejava.util.DateTime of a modern comment creation.

Returns: IModernComment - Added modern comment.

insertComment(int index, String text, ISlide slide, PointF position, Date creationTime)

public abstract IComment insertComment(int index, String text, ISlide slide, PointF position, Date creationTime)

Insert new comment to a collection at the specified index.

Parameters:

ParameterTypeDescription
indexintIndex of the element in a collection at which comment should be inserted.
textjava.lang.StringPlain text of a new comment.
slideISlideSlide in a presentation where to add a new comment.
positionandroid.graphics.PointFPosition on a slide where to add a new comment.
creationTimejava.util.DateTime of a comment creation.

Returns: IComment - Inserted comment.

insertModernComment(int index, String text, ISlide slide, IShape shape, PointF position, Date creationTime)

public abstract IModernComment insertModernComment(int index, String text, ISlide slide, IShape shape, PointF position, Date creationTime)

Insert new modern comment to a collection at the specified index.

Parameters:

ParameterTypeDescription
indexintIndex of the element in a collection at which modern comment should be inserted.
textjava.lang.StringPlain text of a new modern comment.
slideISlideSlide in a presentation where to add a new modern comment.
shapeIShapeShape on a slide to which a new modern comment is associated.
positionandroid.graphics.PointFPosition on a slide where to add a new modern comment.
creationTimejava.util.DateTime of a modern comment creation.

Returns: IModernComment - Inserted modern comment.

toArray()

public abstract IComment[] toArray()

Creates and returns an array with all comments.

Returns: com.aspose.slides.IComment[] - Array of IComment.

toArray(int startIndex, int count)

public abstract IComment[] toArray(int startIndex, int count)

Creates and returns an array with all comments from the specified range.

Parameters:

ParameterTypeDescription
startIndexintAn index of a first comment to return.
countintA number of comments to return.

Returns: com.aspose.slides.IComment[] - Array of IComment.

removeAt(int index)

public abstract void removeAt(int index)

Removes the element at the specified index in a collection.

Parameters:

ParameterTypeDescription
indexintThe zero-based index of the element to remove.

remove(IComment comment)

public abstract void remove(IComment comment)

Removes the first occurrence of the specified comment in a collection.

Parameters:

ParameterTypeDescription
commentICommentThe comment to remove from a collection.

clear()

public abstract void clear()

Removes all comments from a collection.