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 boolean
equals(java.lang.Object obj)
CellAddress
getAddress()
Get the address of the cell that this comment is attached tojava.lang.String
getAuthor()
Name of the original comment authorClientAnchor
getClientAnchor()
Return defines position of this anchor in the sheet.int
getColumn()
Return the column of the cell that contains the commentint
getRow()
Return the row of the cell that contains the commentXSSFRichTextString
getString()
Fetches the rich text string of the commentint
hashCode()
boolean
isVisible()
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
setAuthor(java.lang.String author)
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
setString(java.lang.String string)
void
setString(RichTextString string)
Sets the rich text string used by this comment.void
setVisible(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:Comment
Name 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: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
public CellAddress 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
public void setAddress(CellAddress address)
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
public XSSFRichTextString getString()
Description copied from interface:Comment
Fetches 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: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
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-