|
||||||||||
| 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.IfTag
public class IfTag
An IfTag represents a conditionally placed
Block of Cells.
BaseTag.booleanRichTextStringRichTextStringString
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_ELSE
Attribute for specifying the value of the Cell if the
condition is false (bodiless if-tag only). |
static java.lang.String |
ATTR_ELSE_ACTION
Attribute for specifying the action to be taken if the condition is false (if-tags with a body only). |
static java.lang.String |
ATTR_TEST
Attribute for specifying the boolean test condition. |
static java.lang.String |
ATTR_THEN
Attribute for specifying the value of the Cell if the
condition is true (bodiless if-tag only). |
static java.lang.String |
ELSE_ACTION_CLEAR
Value for the "elseAction" attribute indicating to remove the block by clearing cell contents and not shifting cells, if the test condition is false. |
static java.lang.String |
ELSE_ACTION_REMOVE
Value for the "elseAction" attribute indicating to clear the block by remove the cells, but not shifting other cells, if the test condition is false. |
static java.lang.String |
ELSE_ACTION_SHIFT_LEFT
Value for the "elseAction" attribute indicating to remove the block by shifting cells left, if the test condition is false. |
static java.lang.String |
ELSE_ACTION_SHIFT_UP
Value for the "elseAction" attribute indicating to remove the block by shifting cells up, if the test condition is false. |
| Fields inherited from class net.sf.jett.tag.BaseTag |
|---|
ATTR_ON_PROCESSED, SPEC_SEP |
| Constructor Summary | |
|---|---|
IfTag()
|
|
| 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()
Evaluate the condition. |
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 ELSE_ACTION_SHIFT_UP
public static final java.lang.String ELSE_ACTION_SHIFT_LEFT
public static final java.lang.String ELSE_ACTION_CLEAR
public static final java.lang.String ELSE_ACTION_REMOVE
public static final java.lang.String ATTR_TEST
boolean test condition.
public static final java.lang.String ATTR_THEN
Cell if the
condition is true (bodiless if-tag only).
public static final java.lang.String ATTR_ELSE
Cell if the
condition is false (bodiless if-tag only).
public static final java.lang.String ATTR_ELSE_ACTION
false (if-tags with a body only).
| Constructor Detail |
|---|
public IfTag()
| 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()
Tag. Some optional
attributes are only valid for bodiless tags, and others are only valid
for tags without bodies.
validateAttributes in class BaseTagpublic boolean process()
Evaluate the condition.
With Body: If it's true, transform the block of Cells.
If it's false, take the "elseAction", which defaults to removing the
block.
Bodiless: If it's true, evaluate the "then" condition. If it's false, evaluate the "else" condition, which defaults to a value of null.
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 | |||||||||