Tag
public class CommentTag extends BaseTag
A CommentTag
represents a Cell that needs to have an Excel
Comment attached to it. It controls Comment properties such author, the
Rich Text string comment, and whether the Comment is initially visible.
This tag uses the POI method createDrawingPatriarch
to
create an Excel comment on the Cell
on which the tag is
located. The POI documentation warns of corrupting other "drawings" such as
charts and "complex" drawings when calling getDrawingPatriarch
(HSSF code). When testing both .xls and .xlsx template spreadsheets, it
appears that drawings and charts do get corrupted in .xls spreadsheets, but
they do NOT get corrupted in .xlsx spreadsheets.
BaseTag
.RichTextString
String
RichTextString
boolean
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
ATTR_AUTHOR |
Attribute that specifies the author of the Comment to be created.
|
static java.lang.String |
ATTR_COMMENT |
Attribute that specifies the comment text.
|
static java.lang.String |
ATTR_VALUE |
Attribute that specifies the value of the Cell itself after
transformation.
|
static java.lang.String |
ATTR_VISIBLE |
Attribute that specifies whether the comment is initially visible.
|
ATTR_ON_PROCESSED, SPEC_SEP
Constructor | Description |
---|---|
CommentTag() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getName() |
Returns this
Tag's name. |
protected java.util.List<java.lang.String> |
getOptionalAttributes() |
Returns a
List of optional attribute names. |
protected java.util.List<java.lang.String> |
getRequiredAttributes() |
Returns a
List of required attribute names. |
boolean |
process() |
Place the "value" attribute in the cell, and the rest of the
attributes control the creation of a cell comment.
|
void |
validateAttributes() |
Validates the attributes for this
Tag . |
checkAttributes, clearBlock, deleteBlock, getAttributes, getContext, getLocation, getParentTag, getWorkbookContext, isBodiless, processTag, removeBlock, setAttributes, setBodiless, setContext, setParentTag, setWorkbookContext
public static final java.lang.String ATTR_VALUE
public static final java.lang.String ATTR_AUTHOR
public static final java.lang.String ATTR_COMMENT
public static final java.lang.String ATTR_VISIBLE
public java.lang.String getName()
Tag's
name.Tag's
name.protected java.util.List<java.lang.String> getRequiredAttributes()
List
of required attribute names.getRequiredAttributes
in class BaseTag
List
of required attribute names.protected java.util.List<java.lang.String> getOptionalAttributes()
List
of optional attribute names.getOptionalAttributes
in class BaseTag
List
of optional attribute names.public void validateAttributes() throws TagParseException
Tag
. This tag must be
bodiless.validateAttributes
in class BaseTag
TagParseException
- If the attribute values are illegal or
unacceptable.Copyright © 2012–2018 Jett Team. All rights reserved.