Package loci.poi.hssf.usermodel
Class HSSFComment
- java.lang.Object
-
- loci.poi.hssf.usermodel.HSSFShape
-
- loci.poi.hssf.usermodel.HSSFSimpleShape
-
- loci.poi.hssf.usermodel.HSSFTextbox
-
- loci.poi.hssf.usermodel.HSSFComment
-
public class HSSFComment extends HSSFTextbox
Represents a cell comment - a sticky note associated with a cell.- Author:
- Yegor Kozlov
-
-
Field Summary
-
Fields inherited from class loci.poi.hssf.usermodel.HSSFTextbox
OBJECT_TYPE_TEXT
-
Fields inherited from class loci.poi.hssf.usermodel.HSSFSimpleShape
OBJECT_TYPE_COMMENT, OBJECT_TYPE_LINE, OBJECT_TYPE_OVAL, OBJECT_TYPE_PICTURE, OBJECT_TYPE_RECTANGLE
-
Fields inherited from class loci.poi.hssf.usermodel.HSSFShape
LINESTYLE_DASHDOTDOTSYS, LINESTYLE_DASHDOTGEL, LINESTYLE_DASHDOTSYS, LINESTYLE_DASHGEL, LINESTYLE_DASHSYS, LINESTYLE_DOTGEL, LINESTYLE_DOTSYS, LINESTYLE_LONGDASHDOTDOTGEL, LINESTYLE_LONGDASHDOTGEL, LINESTYLE_LONGDASHGEL, LINESTYLE_NONE, LINESTYLE_SOLID, LINEWIDTH_DEFAULT, LINEWIDTH_ONE_PT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HSSFComment(NoteRecord note, TextObjectRecord txo)
HSSFComment(HSSFShape parent, HSSFAnchor anchor)
Construct a new comment with the given parent and anchor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthor()
Name of the original comment authorshort
getColumn()
Return the column of the cell that contains the commentint
getRow()
Return the row of the cell that contains the commentboolean
isVisible()
Sets whether this comment is visible.void
setAuthor(String author)
Name of the original comment authorvoid
setColumn(short 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(HSSFRichTextString string)
Sets the rich text string used by this comment.void
setVisible(boolean visible)
Returns whether this comment is visible.-
Methods inherited from class loci.poi.hssf.usermodel.HSSFTextbox
getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getString, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop
-
Methods inherited from class loci.poi.hssf.usermodel.HSSFSimpleShape
getShapeType, setShapeType
-
Methods inherited from class loci.poi.hssf.usermodel.HSSFShape
countOfAllChildren, getAnchor, getFillColor, getLineStyle, getLineStyleColor, getLineWidth, getParent, isNoFill, setAnchor, setFillColor, setFillColor, setLineStyle, setLineStyleColor, setLineStyleColor, setLineWidth, setNoFill
-
-
-
-
Constructor Detail
-
HSSFComment
public HSSFComment(HSSFShape parent, HSSFAnchor anchor)
Construct a new comment with the given parent and anchor.- Parameters:
parent
-anchor
- defines position of this anchor in the sheet
-
HSSFComment
protected HSSFComment(NoteRecord note, TextObjectRecord txo)
-
-
Method Detail
-
setVisible
public void setVisible(boolean visible)
Returns whether this comment is visible.- Parameters:
visible
-true
if the comment is visible,false
otherwise
-
isVisible
public boolean isVisible()
Sets whether this comment is visible.- Returns:
true
if the comment is visible,false
otherwise
-
getRow
public 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
public 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
public short getColumn()
Return the column of the cell that contains the comment- Returns:
- the 0-based column of the cell that contains the comment
-
setColumn
public void setColumn(short 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
public String getAuthor()
Name of the original comment author- Returns:
- the name of the original author of the comment
-
setAuthor
public void setAuthor(String author)
Name of the original comment author- Parameters:
author
- the name of the original author of the comment
-
setString
public void setString(HSSFRichTextString string)
Sets the rich text string used by this comment.- Overrides:
setString
in classHSSFTextbox
- Parameters:
string
- Sets the rich text string used by this object.
-
-