Package org.apache.poi.xssf.usermodel
Class XSSFComment
- java.lang.Object
-
- org.apache.poi.xssf.usermodel.XSSFComment
-
-
Constructor Summary
Constructors Constructor Description XSSFComment(CommentsTable comments, CTComment comment, com.microsoft.schemas.vml.CTShape vmlShape)Creates a new XSSFComment, associated with a given low level comment object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)CellAddressgetAddress()Get the address of the cell that this comment is attached tojava.lang.StringgetAuthor()Name of the original comment authorClientAnchorgetClientAnchor()Return defines position of this anchor in the sheet.intgetColumn()Return the column of the cell that contains the commentintgetRow()Return the row of the cell that contains the commentXSSFRichTextStringgetString()Fetches the rich text string of the commentinthashCode()booleanisVisible()Returns 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 tovoidsetAuthor(java.lang.String author)Name 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).voidsetString(java.lang.String string)voidsetString(RichTextString string)Sets the rich text string used by this comment.voidsetVisible(boolean visible)Sets whether this comment is visible.
-
-
-
Constructor Detail
-
XSSFComment
public XSSFComment(CommentsTable comments, CTComment comment, com.microsoft.schemas.vml.CTShape vmlShape)
Creates a new XSSFComment, associated with a given low level comment object.
-
-
Method Detail
-
getAuthor
public java.lang.String getAuthor()
Description copied from interface:CommentName of the original comment author
-
setAuthor
public void setAuthor(java.lang.String author)
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
public CellAddress 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
public void setAddress(CellAddress address)
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
public XSSFRichTextString getString()
Description copied from interface:CommentFetches the rich text string of the comment
-
setString
public void setString(RichTextString string)
Sets the rich text string used by this comment.
-
setString
public void setString(java.lang.String string)
-
getClientAnchor
public ClientAnchor 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
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-