public class HSSFComment extends HSSFTextbox implements Comment
HORIZONTAL_ALIGNMENT_CENTERED, HORIZONTAL_ALIGNMENT_DISTRIBUTED, HORIZONTAL_ALIGNMENT_JUSTIFIED, HORIZONTAL_ALIGNMENT_LEFT, HORIZONTAL_ALIGNMENT_RIGHT, OBJECT_TYPE_TEXT, VERTICAL_ALIGNMENT_BOTTOM, VERTICAL_ALIGNMENT_CENTER, VERTICAL_ALIGNMENT_DISTRIBUTED, VERTICAL_ALIGNMENT_JUSTIFY, VERTICAL_ALIGNMENT_TOP
OBJECT_TYPE_ARC, OBJECT_TYPE_COMBO_BOX, OBJECT_TYPE_COMMENT, OBJECT_TYPE_LINE, OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING, OBJECT_TYPE_OVAL, OBJECT_TYPE_PICTURE, OBJECT_TYPE_RECTANGLE, WRAP_BY_POINTS, WRAP_NONE, WRAP_SQUARE
FILL__FILLCOLOR_DEFAULT, LINESTYLE__COLOR_DEFAULT, LINESTYLE_DASHDOTDOTSYS, LINESTYLE_DASHDOTGEL, LINESTYLE_DASHDOTSYS, LINESTYLE_DASHGEL, LINESTYLE_DASHSYS, LINESTYLE_DEFAULT, LINESTYLE_DOTGEL, LINESTYLE_DOTSYS, LINESTYLE_LONGDASHDOTDOTGEL, LINESTYLE_LONGDASHDOTGEL, LINESTYLE_LONGDASHGEL, LINESTYLE_NONE, LINESTYLE_SOLID, LINEWIDTH_DEFAULT, LINEWIDTH_ONE_PT, NO_FILL_DEFAULT, NO_FILLHITTEST_FALSE, NO_FILLHITTEST_TRUE
Modifier | Constructor and Description |
---|---|
|
HSSFComment(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord, NoteRecord note) |
|
HSSFComment(HSSFShape parent, HSSFAnchor anchor)
Construct a new comment with the given parent and anchor.
(使用给定的父级和锚点构造一个新评论。)
|
protected |
HSSFComment(NoteRecord note, TextObjectRecord txo) |
Modifier and Type | Method and Description |
---|---|
void |
afterRemove(HSSFPatriarch patriarch)
remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes
(从 patriarch.escherAggregate 中删除 escher 容器 删除 obj、textObj 和注释记录(如果有必要)在 ShapeGroup 的情况下删除所有包含的形状)
|
protected HSSFShape |
cloneShape() |
protected ObjRecord |
createObjRecord() |
protected EscherContainerRecord |
createSpContainer() |
boolean |
equals(java.lang.Object obj) |
CellAddress |
getAddress()
Get the address of the cell that this comment is attached to
(获取此评论附加到的单元格的地址)
|
java.lang.String |
getAuthor()
Name of the original comment author
(原评论作者姓名)
|
int |
getBackgroundImageId() |
ClientAnchor |
getClientAnchor()
Return defines position of this anchor in the sheet.
(Return 定义了该锚在工作表中的位置。)
|
int |
getColumn()
Return the column of the cell that contains the comment
(返回包含评论的单元格的列)
|
protected NoteRecord |
getNoteRecord()
Returns the underlying Note record
(返回基础 Note 记录)
|
int |
getRow()
Return the row of the cell that contains the comment
(返回包含注释的单元格的行)
|
int |
hashCode() |
boolean |
hasPosition()
Do we know which cell this comment belongs to?
(我们知道这条评论属于哪个单元格吗?)
|
boolean |
isVisible()
Returns whether this comment is visible.
(返回此评论是否可见。)
|
void |
resetBackgroundImage() |
void |
setAddress(CellAddress address)
Set the address of the cell that this comment is attached to
(设置此评论附加到的单元格的地址)
|
void |
setAddress(int row, int col)
Set the address of the cell that this comment is attached to
(设置此评论附加到的单元格的地址)
|
void |
setAuthor(java.lang.String author)
Name of the original comment author
(原评论作者姓名)
|
void |
setBackgroundImage(int pictureIndex) |
void |
setColumn(int col)
Set the column of the cell that contains the comment
(设置包含注释的单元格的列)
|
void |
setRow(int row)
Set the row of the cell that contains the comment
(设置包含注释的单元格的行)
|
void |
setShapeType(int shapeType) |
void |
setVisible(boolean visible)
Sets whether this comment is visible.
(设置此评论是否可见。)
|
getHorizontalAlignment, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getVerticalAlignment, setHorizontalAlignment, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setVerticalAlignment
createTextObjRecord, getShapeId, getShapeType, getString, getTextObjectRecord, getWrapText, setString, setWrapText
countOfAllChildren, getAnchor, getEscherContainer, getFillColor, getLineStyle, getLineStyleColor, getLineWidth, getObjRecord, getOptRecord, getParent, getPatriarch, getRotationDegree, getShapeName, isFlipHorizontal, isFlipVertical, isNoFill, setAnchor, setFillColor, setFillColor, setFlipHorizontal, setFlipVertical, setLineStyle, setLineStyleColor, setLineStyleColor, setLineWidth, setNoFill, setParent, setPatriarch, setPropertyValue, setRotationDegree
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAnchor, getParent, getShapeName, isNoFill, setFillColor, setLineStyleColor, setNoFill
public HSSFComment(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord, NoteRecord note)
public HSSFComment(HSSFShape parent, HSSFAnchor anchor)
parent
-
(家长 -)
anchor
- defines position of this anchor in the sheet
(锚 - 定义此锚在工作表中的位置)
protected HSSFComment(NoteRecord note, TextObjectRecord txo)
protected EscherContainerRecord createSpContainer()
createSpContainer
in class
HSSFTextbox
protected ObjRecord createObjRecord()
createObjRecord
in class
HSSFTextbox
public void setVisible(boolean visible)
setVisible
in interface
Comment
(接口注释中的 setVisible)
visible
-
true
if the comment is visible,
false
otherwise
(visible - 如果评论可见则为 true,否则为 false)
public boolean isVisible()
public CellAddress getAddress()
Comment
getAddress
in interface
Comment
(接口注释中的getAddress)
public void setAddress(CellAddress address)
Comment
setAddress
in interface
Comment
(接口注释中的 setAddress)
public void setAddress(int row, int col)
Comment
setAddress
in interface
Comment
(接口注释中的 setAddress)
public int getRow()
public void setRow(int row)
public int getColumn()
public void setColumn(int col)
public java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
protected NoteRecord getNoteRecord()
public boolean hasPosition()
public ClientAnchor getClientAnchor()
Comment
Comment.setAddress(org.apache.poi.ss.util.CellAddress)
.
(Return 定义了该锚在工作表中的位置。锚点是当评论可见时呈现在工作表顶部的黄色框/气球。要将评论与不同的单元格相关联,请使用 Comment.setAddress(org.apache.poi.ss.util.CellAddress)。)
getClientAnchor
in interface
Comment
(接口注释中的getClientAnchor)
public void setShapeType(int shapeType)
setShapeType
in class
HSSFTextbox
shapeType
- - shapeType
(形状类型 - - 形状类型)
HSSFShapeTypes
public void afterRemove(HSSFPatriarch patriarch)
HSSFShape
afterRemove
in class
HSSFTextbox
protected HSSFShape cloneShape()
cloneShape
in class
HSSFTextbox
public void setBackgroundImage(int pictureIndex)
public void resetBackgroundImage()
public int getBackgroundImageId()
public boolean equals(java.lang.Object obj)
equals
in class
java.lang.Object
public int hashCode()
hashCode
in class
java.lang.Object
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.