Package org.apache.poi.xssf.usermodel
Class XSSFComment
java.lang.Object
org.apache.poi.xssf.usermodel.XSSFComment
- All Implemented Interfaces:
Comment
-
Constructor Summary
ConstructorsConstructorDescriptionXSSFComment
(CommentsTable comments, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment comment, com.microsoft.schemas.vml.CTShape vmlShape) Creates a new XSSFComment, associated with a given low level comment object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the address of the cell that this comment is attached toName of the original comment authorReturn defines position of this anchor in the sheet.int
Return the column of the cell that contains the commentprotected org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment
protected com.microsoft.schemas.vml.CTShape
int
getRow()
Return the row of the cell that contains the commentFetches the rich text string of the commentint
hashCode()
boolean
Returns whether this comment is visible.void
setAddress
(int row, int col) Set the address of the cell that this comment is attached tovoid
setAddress
(CellAddress address) Set the address of the cell that this comment is attached tovoid
Name of the original comment author.void
setColumn
(int col) Set the column of the cell that contains the comment If changing both row and column, usesetAddress(int, int)
.void
setRow
(int row) Set the row of the cell that contains the comment If changing both row and column, usesetAddress(int, int)
.void
void
setString
(RichTextString string) Sets the rich text string used by this comment.void
setVisible
(boolean visible) Sets whether this comment is visible.
-
Constructor Details
-
XSSFComment
public XSSFComment(CommentsTable comments, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment comment, com.microsoft.schemas.vml.CTShape vmlShape) Creates a new XSSFComment, associated with a given low level comment object.
-
-
Method Details
-
getAuthor
Description copied from interface:Comment
Name of the original comment author -
setAuthor
Name of the original comment author. Default value is blank. -
getColumn
public int getColumn()Description copied from interface:Comment
Return the column of the cell that contains the comment -
getRow
public int getRow()Description copied from interface:Comment
Return the row of the cell that contains the comment -
isVisible
public boolean isVisible()Returns whether this comment is visible. -
setVisible
public void setVisible(boolean visible) Sets whether this comment is visible.- Specified by:
setVisible
in interfaceComment
- Parameters:
visible
-true
if the comment is visible,false
otherwise
-
getAddress
Description copied from interface:Comment
Get the address of the cell that this comment is attached to- Specified by:
getAddress
in interfaceComment
- Returns:
- comment cell address
-
setAddress
public void setAddress(int row, int col) Description copied from interface:Comment
Set the address of the cell that this comment is attached to- Specified by:
setAddress
in interfaceComment
-
setAddress
Description copied from interface:Comment
Set the address of the cell that this comment is attached to- Specified by:
setAddress
in interfaceComment
-
setColumn
public void setColumn(int col) Set the column of the cell that contains the comment If changing both row and column, usesetAddress(int, int)
. -
setRow
public void setRow(int row) Set the row of the cell that contains the comment If changing both row and column, usesetAddress(int, int)
. -
getString
Description copied from interface:Comment
Fetches the rich text string of the comment -
setString
Sets the rich text string used by this comment. -
setString
-
getClientAnchor
Description copied from interface:Comment
Return defines position of this anchor in the sheet. The anchor is the yellow box/balloon that is rendered on top of the sheets when the comment is visible. To associate a comment with a different cell, useComment.setAddress(org.apache.poi.ss.util.CellAddress)
.- Specified by:
getClientAnchor
in interfaceComment
- Returns:
- defines position of this anchor in the sheet
-
getCTComment
protected org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment getCTComment()- Returns:
- the xml bean holding this comment's properties
-
getCTShape
protected com.microsoft.schemas.vml.CTShape getCTShape() -
equals
-
hashCode
public int hashCode()
-