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 | 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 chararcters with the font setting. | ||
method | getCharacters() | |
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) |
getCommentShape : CommentShape | |
CommentShape getCommentShape() |
getRow : int | |
int getRow() |
getColumn : int | |
int getColumn() |
getThreadedComments : ThreadedCommentCollection | |
ThreadedCommentCollection getThreadedComments() |
getNote/setNote : String | |
String getNote() / setNote(value) |
getHtmlNote/setHtmlNote : String | |
String getHtmlNote() / setHtmlNote(value) |
getFont : Font | |
Font getFont() |
isVisible/setVisible : boolean | |
boolean isVisible() / setVisible(value) |
getTextOrientationType/setTextOrientationType : int | |
int getTextOrientationType() / setTextOrientationType(value) |
getTextHorizontalAlignment/setTextHorizontalAlignment : int | |
int getTextHorizontalAlignment() / setTextHorizontalAlignment(value) |
getTextVerticalAlignment/setTextVerticalAlignment : int | |
int getTextVerticalAlignment() / setTextVerticalAlignment(value) |
getAutoSize/setAutoSize : boolean | |
boolean getAutoSize() / setAutoSize(value) |
getHeightCM/setHeightCM : float | |
float getHeightCM() / setHeightCM(value) |
getWidthCM/setWidthCM : float | |
float getWidthCM() / setWidthCM(value) |
getWidth/setWidth : int | |
int getWidth() / setWidth(value) |
getHeight/setHeight : int | |
int getHeight() / setHeight(value) |
getWidthInch/setWidthInch : float | |
float getWidthInch() / setWidthInch(value) |
getHeightInch/setHeightInch : float | |
float getHeightInch() / setHeightInch(value) |
Method Detail |
---|
formatCharacters | |
formatCharacters(startIndex, length, font, flag) |
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) |
startIndex: int
- The index of the start of the character.length: int
- The number of characters.getCharacters | |
ArrayList getCharacters() |