com.aspose.slides.pptx
Class CommentsEx

java.lang.Object
  extended by com.aspose.slides.pptx.CommentsEx

public final class CommentsEx
extends java.lang.Object

Represents a collection of comments of one author.


Method Summary
 boolean addComment(java.lang.String text, SlideEx slide, java.awt.geom.Point2D.Float position, java.util.Date creationTime)
          Add new comment at the end of a collection.
 void clear()
          Removes all comments from a slide.
 CommentEx get(int index)
           
 java.util.Iterator<CommentEx> getIterator()
           
 int getSize()
           
 void insertComment(int index, java.lang.String text, SlideEx slide, java.awt.geom.Point2D.Float position, java.util.Date creationTime)
          Insert new comment to a collection at the specified index.
 void remove(CommentEx comment)
          Removes the first occurrence of the specified comment in a collection.
 void remove(int index)
          Removes the element at the specified index in a collection.
 CommentEx[] toArray()
           
 CommentEx[] toArray(int startIndex, int count)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSize

public int getSize()
Returns:
Number of elements actually contained in the collection.

get

public CommentEx get(int index)
Parameters:
index -
Returns:
Element at the specified index.

addComment

public boolean addComment(java.lang.String text,
                          SlideEx slide,
                          java.awt.geom.Point2D.Float position,
                          java.util.Date creationTime)
Add new comment at the end of a collection.

Parameters:
text - Plain text of a new comment.
slide - Slide in a presentation where to add a new comment.
position - Position on a slide where to add a new comment.
creationTime - Time of a comment creation.
Returns:
true if added comment in a collection else false.

insertComment

public void insertComment(int index,
                          java.lang.String text,
                          SlideEx slide,
                          java.awt.geom.Point2D.Float position,
                          java.util.Date creationTime)
Insert new comment to a collection at the specified index.

Parameters:
index - Index of the element in a collection at which comment should be inserted.
text - Plain text of a new comment.
slide - Slide in a presentation where to add a new comment.
position - Position on a slide where to add a new comment.
creationTime - Time of a comment creation.

toArray

public CommentEx[] toArray()
Returns:
Array with all comments.

toArray

public CommentEx[] toArray(int startIndex,
                           int count)
Parameters:
startIndex - An index of a first comment to return.
count - A number of comments to return.
Returns:
array with all comments from the specified range.

remove

public void remove(int index)
Removes the element at the specified index in a collection.

Parameters:
index - The zero-based index of the element to remove.

remove

public void remove(CommentEx comment)
Removes the first occurrence of the specified comment in a collection.

Parameters:
comment - The comment to remove from a collection.

getIterator

public java.util.Iterator<CommentEx> getIterator()
Returns:
Iterator for the entire collection.

clear

public void clear()
Removes all comments from a slide.