public class VariablesInfo
extends java.lang.Object
Constructor and Description |
---|
VariablesInfo(NodeInfo parent,
java.util.Map<java.lang.String,java.lang.String> vars,
boolean local,
ConditionImpl cond)
The same as VariablesInfo(parent, vars, locale, "none", cond).
|
VariablesInfo(NodeInfo parent,
java.util.Map<java.lang.String,java.lang.String> vars,
boolean local,
java.lang.String composite,
ConditionImpl cond)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
appendChild(NodeInfo child)
Append a child
|
void |
apply(Component comp)
Applies the variable element against the parent component.
|
void |
apply(Page page)
Applies the variable element against the page.
|
java.util.List<NodeInfo> |
getChildren()
Returns a readonly list of children.
|
java.lang.String |
getComposite()
Returns the composite type: "none", "list" or "map".
|
Evaluator |
getEvaluator()
Returns the evaluator.
|
EvaluatorRef |
getEvaluatorRef()
Returns the evaluator reference.
|
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.
|
boolean |
isEffective(Component comp)
Used to evaluate whether it is effective.
|
boolean |
isEffective(Page page)
Used to evaluate whether it is effective.
|
boolean |
isLocal()
Returns if it is for local variable.
|
boolean |
removeChild(NodeInfo child)
Removes a child.
|
void |
setCondition(ConditionImpl cond)
Sets the effectiveness condition.
|
java.lang.String |
toString() |
boolean |
withCondition()
Tests if the condition is set
|
public VariablesInfo(NodeInfo parent, java.util.Map<java.lang.String,java.lang.String> vars, boolean local, java.lang.String composite, ConditionImpl cond)
vars
- a map of (String name, String value).
Note: once called, the caller cannot access it any more.
In other words, it becomes part of this object.local
- whether they are local variables.composite
- indicates the composite type.
It can be one of "none", "list" or "map".
If null or empty, "none" is assumed.java.lang.IllegalArgumentException
- if the composite type is illegal.public VariablesInfo(NodeInfo parent, java.util.Map<java.lang.String,java.lang.String> vars, boolean local, ConditionImpl cond)
vars
- a map of (String name, String value).
Note: once called, the caller cannot access it any more.
In other words, it becomes part of this object.local
- whether they are local variables.public boolean isLocal()
public java.lang.String getComposite()
public void apply(Component comp)
comp
- the parent component (it cannot be null)public void apply(Page page)
public java.lang.String toString()
toString
in class java.lang.Object
public void setCondition(ConditionImpl cond)
public boolean withCondition()
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
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 void appendChild(NodeInfo child)
NodeInfo
appendChild
in interface NodeInfo
public boolean removeChild(NodeInfo child)
NodeInfo
removeChild
in interface NodeInfo
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.