|
fop 1.0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.fop.util.text.IfFieldPart
Defines an "if" field part that checks if field's value is true or false.
It returns either of two possible values attached as additional part parameters. Example:
{field,if,Yes,No}
| Nested Class Summary | |
static class |
IfFieldPart.Factory
Part factory for "if". |
| Field Summary | |
protected java.lang.String |
elseValue
the value being returned if the field is false |
protected java.lang.String |
fieldName
the field name for the part |
protected java.lang.String |
ifValue
the value being returned if the field is true |
| Constructor Summary | |
IfFieldPart(java.lang.String fieldName,
java.lang.String values)
Creates a new "if" field part. |
|
| Method Summary | |
boolean |
isGenerated(java.util.Map params)
Indicates whether there is any content that is generated by this message part. |
protected boolean |
isTrue(java.util.Map params)
Indicates whether the field's value is true. |
protected void |
parseValues(java.lang.String values)
Parses the parameter values |
java.lang.String |
toString()
|
void |
write(java.lang.StringBuffer sb,
java.util.Map params)
Writes the formatted part to a string buffer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String fieldName
protected java.lang.String ifValue
protected java.lang.String elseValue
| Constructor Detail |
public IfFieldPart(java.lang.String fieldName,
java.lang.String values)
fieldName - the field namevalues - the unparsed parameter values| Method Detail |
protected void parseValues(java.lang.String values)
values - the unparsed parameter values
public void write(java.lang.StringBuffer sb,
java.util.Map params)
write in interface AdvancedMessageFormat.Partsb - the target string bufferparams - the parameters to work withprotected boolean isTrue(java.util.Map params)
params - the message parameters
public boolean isGenerated(java.util.Map params)
isGenerated in interface AdvancedMessageFormat.Partparams - the parameters to work with
public java.lang.String toString()
|
fop 1.0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||