Package org.apache.poi.ss.usermodel
Interface Comment
-
- All Known Implementing Classes:
HSSFComment
public interface Comment
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CellAddress
getAddress()
Get the address of the cell that this comment is attached toString
getAuthor()
Name of the original comment authorClientAnchor
getClientAnchor()
Return defined 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 commentRichTextString
getString()
Fetches the rich text string of the commentboolean
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 addr)
Set the address of the cell that this comment is attached tovoid
setAuthor(String author)
Name of the original comment authorvoid
setColumn(int col)
Set the column of the cell that contains the commentvoid
setRow(int row)
Set the row of the cell that contains the commentvoid
setString(RichTextString string)
Sets the rich text string used by this comment.void
setVisible(boolean visible)
Sets whether this comment is visible.
-
-
-
Method Detail
-
setVisible
void setVisible(boolean visible)
Sets whether this comment is visible.- Parameters:
visible
-true
if the comment is visible,false
otherwise
-
isVisible
boolean isVisible()
Returns whether this comment is visible.- Returns:
true
if the comment is visible,false
otherwise
-
getAddress
CellAddress getAddress()
Get the address of the cell that this comment is attached to- Returns:
- comment cell address
- Since:
- 3.15-beta1
-
setAddress
void setAddress(CellAddress addr)
Set the address of the cell that this comment is attached to- Since:
- 3.15-beta1
-
setAddress
void setAddress(int row, int col)
Set the address of the cell that this comment is attached to- Since:
- 3.15-beta1
-
getRow
int getRow()
Return the row of the cell that contains the comment- Returns:
- the 0-based row of the cell that contains the comment
-
setRow
void setRow(int row)
Set the row of the cell that contains the comment- Parameters:
row
- the 0-based row of the cell that contains the comment
-
getColumn
int getColumn()
Return the column of the cell that contains the comment- Returns:
- the 0-based column of the cell that contains the comment
-
setColumn
void setColumn(int col)
Set the column of the cell that contains the comment- Parameters:
col
- the 0-based column of the cell that contains the comment
-
getAuthor
String getAuthor()
Name of the original comment author- Returns:
- the name of the original author of the comment
-
setAuthor
void setAuthor(String author)
Name of the original comment author- Parameters:
author
- the name of the original author of the comment
-
getString
RichTextString getString()
Fetches the rich text string of the comment
-
setString
void setString(RichTextString string)
Sets the rich text string used by this comment.- Parameters:
string
- Sets the rich text string used by this object.
-
getClientAnchor
ClientAnchor getClientAnchor()
Return defined 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, usesetAddress(org.apache.poi.ss.util.CellAddress)
.- Returns:
- defined position of this anchor in the sheet, can be null
-
-