|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.ui.metainfo.TemplateInfo
public class TemplateInfo
Represent a template element.
Constructor Summary | |
---|---|
TemplateInfo(NodeInfo parent,
java.lang.String name,
java.lang.String src,
java.util.Map<java.lang.String,java.lang.String> params,
ConditionImpl cond)
Creates a template. |
Method Summary | |
---|---|
void |
appendChild(NodeInfo child)
Append a child |
java.util.List<NodeInfo> |
getChildren()
Returns a readonly list of children. |
ConditionImpl |
getCondition()
Returns the effectiveness condition. |
Evaluator |
getEvaluator()
Returns the evaluator. |
EvaluatorRef |
getEvaluatorRef()
Returns the evaluator reference. |
java.lang.String |
getName()
Returns the name of the template info. |
PageDefinition |
getPageDefinition()
Returns the page definition, i.e., the root node, or null if not available. |
NodeInfo |
getParent()
Returns the parent, or null if it has no parent. |
java.lang.String |
getSrc(Component comp)
Returns the URI to create the template from, or null if not specified. |
boolean |
isEffective(Component comp)
Used to evaluate whether it is effective. |
boolean |
isEffective(Page page)
Used to evaluate whether it is effective. |
boolean |
removeChild(NodeInfo child)
Removes a child. |
java.util.Map<java.lang.String,java.lang.Object> |
resolveParameters(Component comp)
Evaluates and returns a readonly map of parameters assigned to this template (never null). |
void |
setCondition(ConditionImpl cond)
Sets the effectiveness condition. |
java.lang.String |
toString()
|
boolean |
withCondition()
Tests if the condition is set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TemplateInfo(NodeInfo parent, java.lang.String name, java.lang.String src, java.util.Map<java.lang.String,java.lang.String> params, ConditionImpl cond)
parent
- the parent node (never null)name
- the name of the template (never null)params
- the map of parameters. Igored if null.Method Detail |
---|
public java.lang.String getName()
public java.lang.String getSrc(Component comp)
public java.util.Map<java.lang.String,java.lang.Object> resolveParameters(Component comp)
public java.lang.String toString()
toString
in class java.lang.Object
public ConditionImpl getCondition()
public void setCondition(ConditionImpl cond)
public boolean withCondition()
public void appendChild(NodeInfo child)
NodeInfo
appendChild
in interface NodeInfo
public boolean removeChild(NodeInfo child)
NodeInfo
removeChild
in interface NodeInfo
public java.util.List<NodeInfo> getChildren()
NodeInfo
Note: the returned list is readonly. To modify, please use
NodeInfo.appendChild(org.zkoss.zk.ui.metainfo.NodeInfo)
and NodeInfo.removeChild(org.zkoss.zk.ui.metainfo.NodeInfo)
instead.
getChildren
in interface NodeInfo
public boolean isEffective(Component comp)
Condition
isEffective
in interface Condition
comp
- used as the self variable. Ignored if null.public boolean isEffective(Page page)
Condition
isEffective
in interface Condition
page
- used as the self variable. Ignored if null.public EvaluatorRef getEvaluatorRef()
NodeInfo
getEvaluatorRef
in interface NodeInfo
public PageDefinition getPageDefinition()
NodeInfo
getPageDefinition
in interface NodeInfo
public Evaluator getEvaluator()
NodeInfo
All nodes in the same ZUML tree has the same evaluator reference
(inherited from the root node, PageDefinition.getEvaluatorRef()
).
getEvaluator
in interface NodeInfo
public NodeInfo getParent()
NodeInfo
getParent
in interface NodeInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |