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 TypeMethodDescriptionbooleanGet the address of the cell that this comment is attached toName of the original comment authorReturn defines position of this anchor in the sheet.intReturn the column of the cell that contains the commentprotected org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentprotected com.microsoft.schemas.vml.CTShapeintgetRow()Return the row of the cell that contains the commentFetches the rich text string of the commentinthashCode()booleanReturns whether this comment is visible.voidsetAddress(int row, int col) Set the address of the cell that this comment is attached tovoidsetAddress(CellAddress address) Set the address of the cell that this comment is attached tovoidName of the original comment author.voidsetColumn(int col) Set the column of the cell that contains the comment If changing both row and column, usesetAddress(int, int).voidsetRow(int row) Set the row of the cell that contains the comment If changing both row and column, usesetAddress(int, int).voidvoidsetString(RichTextString string) Sets the rich text string used by this comment.voidsetVisible(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:CommentName of the original comment author -
setAuthor
Name of the original comment author. Default value is blank. -
getColumn
public int getColumn()Description copied from interface:CommentReturn the column of the cell that contains the comment -
getRow
public int getRow()Description copied from interface:CommentReturn 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:
setVisiblein interfaceComment- Parameters:
visible-trueif the comment is visible,falseotherwise
-
getAddress
Description copied from interface:CommentGet the address of the cell that this comment is attached to- Specified by:
getAddressin interfaceComment- Returns:
- comment cell address
-
setAddress
public void setAddress(int row, int col) Description copied from interface:CommentSet the address of the cell that this comment is attached to- Specified by:
setAddressin interfaceComment
-
setAddress
Description copied from interface:CommentSet the address of the cell that this comment is attached to- Specified by:
setAddressin 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:CommentFetches the rich text string of the comment -
setString
Sets the rich text string used by this comment. -
setString
-
getClientAnchor
Description copied from interface:CommentReturn 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:
getClientAnchorin 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()
-