Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class Comments

java.lang.Object
  extended by com.aspose.cells.Comments

public class Comments
extends java.lang.Object

Encapsulates a collection of Comment objects.


Method Summary
 int add(int row, int column)
          Deprecated. replaced by Shapes.addComment(int, int)
 int add(java.lang.String cellName)
          Deprecated. replaced by Shapes.addComment(String)
 void clear()
          Clears all the comments in the worksheet.
 Comment get(int index)
          Gets Comment object by index.
 Comment getComment(int row, int column)
          Gets the Comment for given cell position.
 int size()
          Gets number of comments in the worksheet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public int add(int row,
               int column)
Deprecated. replaced by Shapes.addComment(int, int)

Adds a comment to the collection.

Parameters:
row - row index.
column - column index.
Returns:
Comment Object index.
Throws:
java.lang.IllegalArgumentException - if row or column index is out of range.
CellsException - if the comment collection has been removed from the worksheet.

add

public int add(java.lang.String cellName)
Deprecated. replaced by Shapes.addComment(String)

Adds a comment to the collection.

Parameters:
cellName - cell name.
Returns:
Comment Object index.
Throws:
java.lang.IllegalArgumentException - if row or column index is out of range.
CellsException - if the comment collection has been removed from the worksheet.

get

public Comment get(int index)
Gets Comment object by index.

Parameters:
index - Comment object index.
Returns:
Comment object.
Throws:
java.lang.IllegalArgumentException - if index is out of range.
CellsException - if the comment collection has been removed from the worksheet.

size

public int size()
Gets number of comments in the worksheet.

Returns:
number of comments.
Throws:
CellsException - if the comment collection has been removed from the worksheet.

clear

public void clear()
Clears all the comments in the worksheet.


getComment

public Comment getComment(int row,
                          int column)
Gets the Comment for given cell position.

Parameters:
row - row index of cell.
column - column index of cell.
Returns:
Comment object if there is a comment for given cell. Otherwise returns null.