com.aspose.slides
Class CommentCollection

java.lang.Object
  extended by com.aspose.slides.CommentCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IComment>, com.aspose.ms.System.Collections.IEnumerable<IComment>, ICommentCollection, IGenericCollection<IComment>, java.lang.Iterable<IComment>

public final class CommentCollection
extends java.lang.Object
implements ICommentCollection

Represents a collection of comments of one author.


Method Summary
 IComment addComment(java.lang.String text, ISlide 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 collection.
 void copyTo(IComment[] array, int index)
           Copies all elements from the collection to the specified array.
 IComment get_Item(int index)
           Gets the element at the specified index.
 com.aspose.slides.IDOMObject getParent_Immediate()
           Returns Parent_Immediate object.
 java.lang.Object getSyncRoot()
           Returns a synchronization root.
 IComment insertComment(int index, java.lang.String text, ISlide slide, java.awt.geom.Point2D.Float position, java.util.Date creationTime)
           Insert new comment to a collection at the specified index.
 boolean isSynchronized()
           Returns a value indicating whether access to the collection is synchronized (thread-safe).
 com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IComment> iterator()
           Returns an enumerator that iterates through the collection.
 void remove(IComment comment)
           Removes the first occurrence of the specified comment in a collection.
 void removeAt(int index)
           Removes the element at the specified index in a collection.
 int size()
           Gets the number of elements actually contained in the collection.
 IComment[] toArray()
           Creates and returns an array with all comments.
 IComment[] toArray(int startIndex, int count)
           Creates and returns an array with all comments from the specified range.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

size

public int size()

Gets the number of elements actually contained in the collection. Read-only int.

Specified by:
size in interface IGenericCollection<IComment>

get_Item

public IComment get_Item(int index)

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

Specified by:
get_Item in interface ICommentCollection

addComment

public IComment addComment(java.lang.String text,
                           ISlide slide,
                           java.awt.geom.Point2D.Float position,
                           java.util.Date creationTime)

Add new comment at the end of a collection.

Specified by:
addComment in interface ICommentCollection
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:
Added comment.

insertComment

public IComment insertComment(int index,
                              java.lang.String text,
                              ISlide slide,
                              java.awt.geom.Point2D.Float position,
                              java.util.Date creationTime)

Insert new comment to a collection at the specified index.

Specified by:
insertComment in interface ICommentCollection
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.
Returns:
Inserted comment.

toArray

public IComment[] toArray()

Creates and returns an array with all comments.

Specified by:
toArray in interface ICommentCollection
Returns:
Array of Comment.

toArray

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

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

Specified by:
toArray in interface ICommentCollection
Parameters:
startIndex - An index of a first comment to return.
count - A number of comments to return.
Returns:
Array of Comment.

removeAt

public void removeAt(int index)

Removes the element at the specified index in a collection.

Specified by:
removeAt in interface ICommentCollection
Parameters:
index - The zero-based index of the element to remove.
Throws:
com.aspose.ms.System.ArgumentOutOfRangeException - Index is less than 0 or index is equal or greater than Count
PptxEditException - Thrown if comment is already removed.

remove

public void remove(IComment comment)

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

Specified by:
remove in interface ICommentCollection
Parameters:
comment - The comment to remove from a collection.
Throws:
com.aspose.ms.System.ArgumentNullException - If comment is null
PptxEditException - Thrown if comment is already removed.

clear

public void clear()

Removes all comments from a collection.

Specified by:
clear in interface ICommentCollection

iterator

public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IComment> iterator()

Returns an enumerator that iterates through the collection.

Specified by:
iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IComment>
Specified by:
iterator in interface com.aspose.ms.System.Collections.IEnumerable<IComment>
Specified by:
iterator in interface java.lang.Iterable<IComment>
Returns:
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

copyTo

public void copyTo(IComment[] array,
                   int index)

Copies all elements from the collection to the specified array.

Specified by:
copyTo in interface IGenericCollection<IComment>
Parameters:
array - Target array.
index - Starting index in the target array.

isSynchronized

public boolean isSynchronized()

Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only boolean.

Specified by:
isSynchronized in interface IGenericCollection<IComment>

getSyncRoot

public java.lang.Object getSyncRoot()

Returns a synchronization root. Read-only Object.

Specified by:
getSyncRoot in interface IGenericCollection<IComment>

getParent_Immediate

public com.aspose.slides.IDOMObject getParent_Immediate()

Returns Parent_Immediate object. Read-only IDOMObject.



Copyright © Copyright 2004-2016 Aspose Pty Ltd. All Rights Reserved.