public class AttributesInfo
extends java.lang.Object
ComponentDefinition).
It is equivalent to the custom-attributes element.
Note: it is serializable.
| Constructor and Description |
|---|
AttributesInfo(NodeInfo parent,
java.util.Map<java.lang.String,java.lang.String> attrs,
java.lang.String scope,
ConditionImpl cond)
The same as AttributesInfo(parent, attrs, scope, "none", cond).
|
AttributesInfo(NodeInfo parent,
java.util.Map<java.lang.String,java.lang.String> attrs,
java.lang.String scope,
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 custom attributes.
|
void |
apply(Page page)
Applies the custom attributes.
|
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.
|
java.lang.String |
getScope()
Returns the scope, or null if it is not associated with a scope.
|
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.
|
void |
setCondition(ConditionImpl cond)
Sets the effectiveness condition.
|
java.lang.String |
toString() |
boolean |
withCondition()
Tests if the condition is set
|
public AttributesInfo(NodeInfo parent, java.util.Map<java.lang.String,java.lang.String> attrs, java.lang.String scope, java.lang.String composite, ConditionImpl cond)
attrs - the custom attributes (String name, String value).
Once called, the caller shall not access attrs again -- it belongs
to this object.scope - specifies the scope.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 AttributesInfo(NodeInfo parent, java.util.Map<java.lang.String,java.lang.String> attrs, java.lang.String scope, ConditionImpl cond)
attrs - the custom attributes (String name, String value).
Once called, the caller shall not access attrs again -- it belongs
to this object.scope - specifies the scope.public java.lang.String getScope()
Notice that, prior to 5.0.8, "component" is returned if it is not associated with a scope (which is not correct since this info might be associated with a page).
public java.lang.String getComposite()
public void apply(Component comp)
Note: this method does nothing if isEffective(org.zkoss.zk.ui.Component) returns false.
public void apply(Page page)
Note: this method does nothing if isEffective(org.zkoss.zk.ui.Component) returns false.
public java.lang.String toString()
toString in class java.lang.Objectpublic void setCondition(ConditionImpl cond)
public boolean withCondition()
public boolean isEffective(Component comp)
ConditionisEffective in interface Conditioncomp - used as the self variable. Ignored if null.public boolean isEffective(Page page)
ConditionisEffective in interface Conditionpage - used as the self variable. Ignored if null.public EvaluatorRef getEvaluatorRef()
NodeInfogetEvaluatorRef in interface NodeInfopublic PageDefinition getPageDefinition()
NodeInfogetPageDefinition in interface NodeInfopublic Evaluator getEvaluator()
NodeInfoAll nodes in the same ZUML tree has the same evaluator reference
(inherited from the root node, PageDefinition.getEvaluatorRef()).
getEvaluator in interface NodeInfopublic NodeInfo getParent()
NodeInfopublic java.util.List<NodeInfo> getChildren()
NodeInfoNote: 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 NodeInfopublic void appendChild(NodeInfo child)
NodeInfoappendChild in interface NodeInfopublic boolean removeChild(NodeInfo child)
NodeInforemoveChild in interface NodeInfoCopyright © 2005-2021 Potix Corporation. All Rights Reserved.