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 | ||
---|---|---|
method | getAuthor() | |
method | setAuthor(value) | |
Gets and sets Name of the original comment author | ||
method | getAutoSize() | |
method | setAutoSize(value) | |
Indicates if size of comment is adjusted automatically according to its content. | ||
method | getColumn() | |
Gets the column index of the comment.
|
||
method | getCommentShape() | |
Get a Shape object that represents the shape attached to the specified comment.
|
||
method | getFont() | |
Gets the font of comment.
|
||
method | getHeight() | |
method | setHeight(value) | |
Represents the Height of the comment, in unit of pixels. | ||
method | getHeightCM() | |
method | setHeightCM(value) | |
Represents the height of the comment, in unit of centimeters. | ||
method | getHeightInch() | |
method | setHeightInch(value) | |
Represents the height of the comment, in unit of inches. | ||
method | getHtmlNote() | |
method | setHtmlNote(value) | |
Gets and sets the html string which contains data and some formats in this comment. | ||
method | isThreadedComment() | |
Indicates whether this comment is a threaded comment.
|
||
method | isVisible() | |
method | setVisible(value) | |
Represents if the comment is visible or not. | ||
method | getNote() | |
method | setNote(value) | |
Represents the content of comment. | ||
method | getRow() | |
Gets the row index of the comment.
|
||
method | getTextHorizontalAlignment() | |
method | setTextHorizontalAlignment(value) | |
Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant. | ||
method | getTextOrientationType() | |
method | setTextOrientationType(value) | |
Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant. | ||
method | getTextVerticalAlignment() | |
method | setTextVerticalAlignment(value) | |
Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant. | ||
method | getThreadedComments() | |
Gets the list of threaded comments;
|
||
method | getWidth() | |
method | setWidth(value) | |
Represents the width of the comment, in unit of pixels. | ||
method | getWidthCM() | |
method | setWidthCM(value) | |
Represents the width of the comment, in unit of centimeters. | ||
method | getWidthInch() | |
method | setWidthInch(value) | |
Represents the width of the comment, in unit of inches. |
Method Summary | ||
---|---|---|
method | characters(startIndex, length) | |
Returns a Characters object that represents a range of characters within the comment text.
|
||
method | formatCharacters(startIndex, length, font, flag) | |
Format some characters with the font setting.
|
||
method | getCharacters() | |
Returns all Characters objects
that represents a range of characters within the comment text.
|
||
method | getRichFormattings() | |
Returns all Characters objects
that represents a range of characters within the comment text.
|
String getAuthor() / setAuthor(value)
CommentShape getCommentShape()
int getRow()
int getColumn()
boolean isThreadedComment()
ThreadedCommentCollection getThreadedComments()
String getNote() / setNote(value)
String getHtmlNote() / setHtmlNote(value)
boolean isVisible() / setVisible(value)
int getTextOrientationType() / setTextOrientationType(value)
int getTextHorizontalAlignment() / setTextHorizontalAlignment(value)
int getTextVerticalAlignment() / setTextVerticalAlignment(value)
boolean getAutoSize() / setAutoSize(value)
float getHeightCM() / setHeightCM(value)
float getWidthCM() / setWidthCM(value)
int getWidth() / setWidth(value)
int getHeight() / setHeight(value)
float getWidthInch() / setWidthInch(value)
float getHeightInch() / setHeightInch(value)
formatCharacters(startIndex, length, font, flag)
startIndex: int
- The start index.length: int
- The length.font: Font
- The font setting.flag: StyleFlag
- The flag of the font setting.FontSetting characters(startIndex, length)
startIndex: int
- The index of the start of the character.length: int
- The number of characters.ArrayList getCharacters()
FontSetting[] getRichFormattings()