com.aspose.cells
Class CommentCollection

java.lang.Object
  extended by CollectionBase
      extended by com.aspose.cells.CommentCollection
All Implemented Interfaces:
java.lang.Iterable

public class CommentCollection 
extends CollectionBase

Encapsulates a collection of Comment objects.

Example:

Workbook workbook = new Workbook();

CommentCollection comments = workbook.getWorksheets().get(0).getComments();


Property Getters/Setters Summary
intgetCount()→ inherited from com.aspose.cells.CollectionBase
          
Commentget(int index)
           Gets the Comment element at the specified index.
Commentget(int row, int column)
           Gets the Comment element at the specified row index and column index.
Commentget(java.lang.String cellName)
           Gets the Comment element at the specified cell.
 
Method Summary
intadd(int row, int column)
           Adds a comment to the collection.
intadd(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
intadd(java.lang.String cellName)
           Adds a comment to the collection.
intaddThreadedComment(int row, int column, java.lang.String text, ThreadedCommentAuthor author)
           Adds a threaded comment.
intaddThreadedComment(java.lang.String cellName, java.lang.String text, ThreadedCommentAuthor author)
           Adds a threaded comment.
voidclear()
           Removes all comments;
booleancontains(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
ThreadedCommentCollectiongetThreadedComments(int row, int column)
           Gets the threaded comments by row and column index.
ThreadedCommentCollectiongetThreadedComments(java.lang.String cellName)
           Gets the threaded comments by cell name.
intindexOf(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
java.util.Iteratoriterator()→ inherited from com.aspose.cells.CollectionBase
          
voidremoveAt(int index)→ inherited from com.aspose.cells.CollectionBase
          
voidremoveAt(int row, int column)
           Removes the comment of the specific cell.
voidremoveAt(java.lang.String cellName)
           Removes the comment of the specific cell.
 

Property Getters/Setters Detail

getCount

→ inherited from com.aspose.cells.CollectionBase
public int getCount()

get

public Comment get(int index)
Gets the Comment element at the specified index.
Parameters:
index - The zero based index of the element.
Returns:
The element at the specified index.

get

public Comment get(java.lang.String cellName)
Gets the Comment element at the specified cell.
Parameters:
cellName - Cell name.
Returns:
The element at the specified cell.

get

public Comment get(int row, int column)
Gets the Comment element at the specified row index and column index.
Parameters:
row - Row index.
column - Column index.
Returns:
The element at the specified cell.

Method Detail

addThreadedComment

public int addThreadedComment(int row, int column, java.lang.String text, ThreadedCommentAuthor author)
Adds a threaded comment.
Parameters:
row - Cell row index.
column - Cell column index.
text - The text of the comment
author - The user of this threaded comment.
Returns:
ThreadedComment object index.

addThreadedComment

public int addThreadedComment(java.lang.String cellName, java.lang.String text, ThreadedCommentAuthor author)
Adds a threaded comment.
Parameters:
cellName - The name of the cell.
text - The text of the comment
author - The user of this threaded comment.
Returns:
ThreadedComment object index.

getThreadedComments

public ThreadedCommentCollection getThreadedComments(int row, int column)
Gets the threaded comments by row and column index.
Parameters:
row - The row index.
column - The column index.
Returns:

getThreadedComments

public ThreadedCommentCollection getThreadedComments(java.lang.String cellName)
Gets the threaded comments by cell name.
Parameters:
cellName - The name of the cell.
Returns:

add

public int add(int row, int column)
Adds a comment to the collection.
Parameters:
row - Cell row index.
column - Cell column index.
Returns:
Comment object index.

add

public int add(java.lang.String cellName)
Adds a comment to the collection.
Parameters:
cellName - Cell name.
Returns:
Comment object index.

removeAt

public void removeAt(java.lang.String cellName)
Removes the comment of the specific cell.
Parameters:
cellName - The name of cell which contains a comment.

removeAt

public void removeAt(int row, int column)
Removes the comment of the specific cell.
Parameters:
row - The row index.
column - the column index.

clear

public void clear()
Removes all comments;

removeAt

→ inherited from com.aspose.cells.CollectionBase
public void removeAt(int index)

iterator

→ inherited from com.aspose.cells.CollectionBase
public java.util.Iterator iterator()

contains

→ inherited from com.aspose.cells.CollectionBase
public boolean contains(java.lang.Object value)
Reserved for internal use.

add

→ inherited from com.aspose.cells.CollectionBase
public int add(java.lang.Object value)
Reserved for internal use.

indexOf

→ inherited from com.aspose.cells.CollectionBase
public int indexOf(java.lang.Object value)
Reserved for internal use.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.