|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jett.tag.BaseTag
net.sf.jett.tag.StyleTag
public class StyleTag
A StyleTag represents a dynamically determined style for a
Cell. A StyleTag must have a body.
The style attribute works like the HTML "style" attribute,
in that one can specify one or more style elements in a
property: value; property: value style. If a property is
specified, then it will override whatever value is already present in the
Cell. If a property value is an empty string or the property
is not present, then it will be ignored and it will not override whatever
value is already present in the Cell. Unrecognized property
names and unrecognized values for a property are ignored and do not override
whatever value is already present in the Cell. Property names
and values may be specified in a case insensitive-fashion, i.e. "CENTER" =
"Center" = "center"..
The class attributes works like the HTML "class" attribute,
in that one can specify one or more CSS-like style "classes" in a
semicolon-delimited list. Register CSS-like files and/or CSS-like text with
the ExcelTransformer prior to transformation. Subsequent class
names override previous class names, and the style attribute
overrides the class attribute.
BaseTag.StringStringFor supported property names and values (plus explanations), please see
TagParser.
ExcelTransformer| Field Summary | |
|---|---|
static java.lang.String |
ATTR_CLASS
Attribute that specifies the desired pre-defined style class to apply to the current Cell. |
static java.lang.String |
ATTR_STYLE
Attribute that specifies the desired style property(ies) to change in the current Cell. |
| Fields inherited from class net.sf.jett.tag.BaseTag |
|---|
ATTR_ON_PROCESSED, SPEC_SEP |
| Constructor Summary | |
|---|---|
StyleTag()
|
|
| Method Summary | |
|---|---|
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()
Override the cells' current styles with any non-null style property values. |
void |
validateAttributes()
Validates the attributes for this Tag. |
| Methods inherited from class net.sf.jett.tag.BaseTag |
|---|
checkAttributes, clearBlock, deleteBlock, getAttributes, getContext, getWorkbookContext, isBodiless, processTag, removeBlock, setAttributes, setBodiless, setContext, setWorkbookContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATTR_STYLE
Cell. Properties are specified in a string with the
following format: property1: value1; property2: value2; ...
public static final java.lang.String ATTR_CLASS
Cell. Pre-defined styles are defined by
registering styles with the ExcelTransformer prior to
transformation.
ExcelTransformer.addCssFile(String),
ExcelTransformer.addCssText(String),
Constant Field Values| Constructor Detail |
|---|
public StyleTag()
| Method Detail |
|---|
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 BaseTagList of required attribute names.protected java.util.List<java.lang.String> getOptionalAttributes()
List of optional attribute names.
getOptionalAttributes in class BaseTagList of optional attribute names.
public void validateAttributes()
throws TagParseException
Tag. This tag must have a
body.
validateAttributes in class BaseTagTagParseException - If the attribute values are illegal or
unacceptable.public boolean process()
Override the cells' current styles with any non-null style property values.
process in class BaseTagCell in the Block
associated with this Tag was processed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||