Package org.apache.poi.xssf.usermodel
Class XSSFComment
- java.lang.Object
-
- org.apache.poi.xssf.usermodel.XSSFComment
-
-
Constructor Summary
Constructors Constructor Description XSSFComment(Comments 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.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)CellAddressgetAddress()StringgetAuthor()ClientAnchorgetClientAnchor()intgetColumn()org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentgetCTComment()protected com.microsoft.schemas.vml.CTShapegetCTShape()intgetRow()XSSFRichTextStringgetString()inthashCode()booleanisVisible()Returns whether this comment is visible.voidsetAddress(int row, int col)voidsetAddress(CellAddress address)voidsetAuthor(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(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, 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.
-
XSSFComment
public XSSFComment(Comments 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.- Since:
- POI 5.2.0
-
-
Method Detail
-
getAuthor
public String getAuthor()
-
setAuthor
public void setAuthor(String author)
Name of the original comment author. Default value is blank.
-
getColumn
public int getColumn()
-
getRow
public int getRow()
-
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()
- Specified by:
getAddressin interfaceComment
-
setAddress
public void setAddress(int row, int col)- Specified by:
setAddressin interfaceComment
-
setAddress
public void setAddress(CellAddress address)
- 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()
-
setString
public void setString(RichTextString string)
Sets the rich text string used by this comment.
-
setString
public void setString(String string)
-
getClientAnchor
public ClientAnchor getClientAnchor()
- Specified by:
getClientAnchorin interfaceComment
-
getCTComment
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment getCTComment()
- Returns:
- the xml bean holding this comment's properties
- Since:
- POI 5.2.0 (was protected before POI 5.2.0)
-
getCTShape
protected com.microsoft.schemas.vml.CTShape getCTShape()
-
-