asposecells.api
Class Comment

Encapsulates the object that represents a cell comment.

Example:

workbook = Workbook()
comments = workbook.getWorksheets().get(0).getComments()

# Add comment to cell A1
commentIndex = comments.add(0, 0)
comment = comments.get(commentIndex)
comment.setNote("First note.")
comment.getFont().setName("Times New Roman")

# Add comment to cell B2
comments.add("B2")
comment = comments.get("B2")
comment.setNote("Second note.")

Property Getters/Setters Summary
methodgetAuthor()
methodsetAuthor(value)
           Gets and sets Name of the original comment author
methodgetAutoSize()
methodsetAutoSize(value)
           Indicates if size of comment is adjusted automatically according to its content.
methodgetColumn()
           Gets the column index of the comment.
methodgetCommentShape()
           Get a Shape object that represents the shape attached to the specified comment.
methodgetFont()
           Gets the font of comment.
methodgetHeight()
methodsetHeight(value)
           Represents the Height of the comment, in unit of pixels.
methodgetHeightCM()
methodsetHeightCM(value)
           Represents the height of the comment, in unit of centimeters.
methodgetHeightInch()
methodsetHeightInch(value)
           Represents the height of the comment, in unit of inches.
methodgetHtmlNote()
methodsetHtmlNote(value)
           Gets and sets the html string which contains data and some formats in this comment.
methodisVisible()
methodsetVisible(value)
           Represents if the comment is visible or not.
methodgetNote()
methodsetNote(value)
           Represents the content of comment.
methodgetRow()
           Gets the row index of the comment.
methodgetTextHorizontalAlignment()
methodsetTextHorizontalAlignment(value)
           Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant.
methodgetTextOrientationType()
methodsetTextOrientationType(value)
           Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant.
methodgetTextVerticalAlignment()
methodsetTextVerticalAlignment(value)
           Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant.
methodgetThreadedComments()
           Gets the list of threaded comments;
methodgetWidth()
methodsetWidth(value)
           Represents the width of the comment, in unit of pixels.
methodgetWidthCM()
methodsetWidthCM(value)
           Represents the width of the comment, in unit of centimeters.
methodgetWidthInch()
methodsetWidthInch(value)
           Represents the width of the comment, in unit of inches.
 
Method Summary
methodcharacters(startIndex, length)
           Returns a Characters object that represents a range of characters within the comment text.
methodformatCharacters(startIndex, length, font, flag)
           Format some chararcters with the font setting.
methodgetCharacters()
           Returns all Characters objects that represents a range of characters within the comment text.
 

Property Getters/Setters Detail

getAuthor/setAuthor : String 

String getAuthor() / setAuthor(value)
Gets and sets Name of the original comment author

getCommentShape : CommentShape 

CommentShape getCommentShape()
Get a Shape object that represents the shape attached to the specified comment.

getRow : int 

int getRow()
Gets the row index of the comment.

getColumn : int 

int getColumn()
Gets the column index of the comment.

getThreadedComments : ThreadedCommentCollection 

ThreadedCommentCollection getThreadedComments()
Gets the list of threaded comments;

getNote/setNote : String 

String getNote() / setNote(value)
Represents the content of comment.

getHtmlNote/setHtmlNote : String 

String getHtmlNote() / setHtmlNote(value)
Gets and sets the html string which contains data and some formats in this comment.

getFont : Font 

Font getFont()
Gets the font of comment.

isVisible/setVisible : boolean 

boolean isVisible() / setVisible(value)
Represents if the comment is visible or not.

getTextOrientationType/setTextOrientationType : int 

int getTextOrientationType() / setTextOrientationType(value)
Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant.

getTextHorizontalAlignment/setTextHorizontalAlignment : int 

int getTextHorizontalAlignment() / setTextHorizontalAlignment(value)
Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant.

getTextVerticalAlignment/setTextVerticalAlignment : int 

int getTextVerticalAlignment() / setTextVerticalAlignment(value)
Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant.

getAutoSize/setAutoSize : boolean 

boolean getAutoSize() / setAutoSize(value)
Indicates if size of comment is adjusted automatically according to its content.

getHeightCM/setHeightCM : float 

float getHeightCM() / setHeightCM(value)
Represents the height of the comment, in unit of centimeters.

getWidthCM/setWidthCM : float 

float getWidthCM() / setWidthCM(value)
Represents the width of the comment, in unit of centimeters.

getWidth/setWidth : int 

int getWidth() / setWidth(value)
Represents the width of the comment, in unit of pixels.

getHeight/setHeight : int 

int getHeight() / setHeight(value)
Represents the Height of the comment, in unit of pixels.

getWidthInch/setWidthInch : float 

float getWidthInch() / setWidthInch(value)
Represents the width of the comment, in unit of inches.

getHeightInch/setHeightInch : float 

float getHeightInch() / setHeightInch(value)
Represents the height of the comment, in unit of inches.

Method Detail

formatCharacters

 formatCharacters(startIndex, length, font, flag)
Format some chararcters with the font setting.
Parameters:
startIndex: int - The start index.
length: int - The the length.
font: Font - The font setting.
flag: StyleFlag - The flag of the font setting.

characters

FontSetting characters(startIndex, length)
Returns a Characters object that represents a range of characters within the comment text.
Parameters:
startIndex: int - The index of the start of the character.
length: int - The number of characters.
Returns:
Characters object.

getCharacters

ArrayList getCharacters()
Returns all Characters objects that represents a range of characters within the comment text.
Returns:
All Characters objects

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