ICommentCollection
All Implemented Interfaces: com.aspose.slides.IGenericCollection
public interface ICommentCollection extends IGenericCollection<IComment>
Represents a collection of comments of one author.
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
index | int |
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:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | Plain text of a new comment. |
slide | ISlide | Slide in a presentation where to add a new comment. |
position | android.graphics.PointF | Position on a slide where to add a new comment. |
creationTime | java.util.Date | Time 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:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | Plain text of a new modern comment. |
slide | ISlide | Slide in a presentation where to add a new modern comment. |
shape | IShape | Shape on a slide to which a new modern comment is associated. |
position | android.graphics.PointF | Position on a slide where to add a new modern comment. |
creationTime | java.util.Date | Time 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:
Parameter | Type | Description |
---|---|---|
index | int | Index of the element in a collection at which comment should be inserted. |
text | java.lang.String | Plain text of a new comment. |
slide | ISlide | Slide in a presentation where to add a new comment. |
position | android.graphics.PointF | Position on a slide where to add a new comment. |
creationTime | java.util.Date | Time 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:
Parameter | Type | Description |
---|---|---|
index | int | Index of the element in a collection at which modern comment should be inserted. |
text | java.lang.String | Plain text of a new modern comment. |
slide | ISlide | Slide in a presentation where to add a new modern comment. |
shape | IShape | Shape on a slide to which a new modern comment is associated. |
position | android.graphics.PointF | Position on a slide where to add a new modern comment. |
creationTime | java.util.Date | Time 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:
Parameter | Type | Description |
---|---|---|
startIndex | int | An index of a first comment to return. |
count | int | A 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:
Parameter | Type | Description |
---|---|---|
index | int | The 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:
Parameter | Type | Description |
---|---|---|
comment | IComment | The comment to remove from a collection. |
clear()
public abstract void clear()
Removes all comments from a collection.