Class AttributesInfo
- All Implemented Interfaces:
Serializable,NodeInfo,Condition
ComponentDefinition).
It is equivalent to the custom-attributes element.
Note: it is serializable.
- Author:
- tomyeh
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAttributesInfo(NodeInfo parent, Map<String, String> attrs, String scope, String composite, ConditionImpl cond) Constructor.AttributesInfo(NodeInfo parent, Map<String, String> attrs, String scope, ConditionImpl cond) The same as AttributesInfo(parent, attrs, scope, "none", cond). -
Method Summary
Modifier and TypeMethodDescriptionvoidappendChild(NodeInfo child) Append a childvoidApplies the custom attributes.voidApplies the custom attributes.getAttrs()Returns the internal attributes if any.Returns a readonly list of children.Returns the composite type: "none", "list" or "map".Returns the evaluator.Returns the evaluator reference.Returns the page definition, i.e., the root node, or null if not available.Returns the parent, or null if it has no parent.getScope()Returns the scope, or null if it is not associated with a scope.booleanisEffective(Component comp) Used to evaluate whether it is effective.booleanisEffective(Page page) Used to evaluate whether it is effective.booleanremoveChild(NodeInfo child) Removes a child.voidsetCondition(ConditionImpl cond) Sets the effectiveness condition.toString()booleanTests if the condition is set
-
Constructor Details
-
AttributesInfo
public AttributesInfo(NodeInfo parent, Map<String, String> attrs, String scope, String composite, ConditionImpl cond) Constructor.- Parameters:
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.- Throws:
IllegalArgumentException- if the composite type is illegal.- Since:
- 3.0.6
-
AttributesInfo
The same as AttributesInfo(parent, attrs, scope, "none", cond).- Parameters:
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.
-
-
Method Details
-
getScope
Returns the scope, or null if it is not associated with a scope.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).
- Since:
- 3.0.6
-
getComposite
Returns the composite type: "none", "list" or "map".- Since:
- 3.0.6
-
apply
Applies the custom attributes.Note: this method does nothing if
Condition.isEffective(org.zkoss.zk.ui.Component)returns false. -
apply
Applies the custom attributes.Note: this method does nothing if
Condition.isEffective(org.zkoss.zk.ui.Component)returns false. -
getAttrs
Returns the internal attributes if any.- Since:
- 10.0.0
-
toString
-
setCondition
Sets the effectiveness condition. -
withCondition
public boolean withCondition()Tests if the condition is set -
isEffective
Description copied from interface:ConditionUsed to evaluate whether it is effective.- Specified by:
isEffectivein interfaceCondition- Parameters:
comp- used as the self variable. Ignored if null.
-
isEffective
Description copied from interface:ConditionUsed to evaluate whether it is effective.- Specified by:
isEffectivein interfaceCondition- Parameters:
page- used as the self variable. Ignored if null.
-
getEvaluatorRef
Description copied from interface:NodeInfoReturns the evaluator reference.- Specified by:
getEvaluatorRefin interfaceNodeInfo
-
getPageDefinition
Description copied from interface:NodeInfoReturns the page definition, i.e., the root node, or null if not available.- Specified by:
getPageDefinitionin interfaceNodeInfo
-
getEvaluator
Description copied from interface:NodeInfoReturns the evaluator.All nodes in the same ZUML tree has the same evaluator reference (inherited from the root node,
PageDefinition.getEvaluatorRef()).- Specified by:
getEvaluatorin interfaceNodeInfo
-
getParent
Description copied from interface:NodeInfoReturns the parent, or null if it has no parent. -
getChildren
Description copied from interface:NodeInfoReturns a readonly list of children.Note: the returned list is readonly. To modify, please use
NodeInfo.appendChild(org.zkoss.zk.ui.metainfo.NodeInfo)andNodeInfo.removeChild(org.zkoss.zk.ui.metainfo.NodeInfo)instead.- Specified by:
getChildrenin interfaceNodeInfo
-
appendChild
Description copied from interface:NodeInfoAppend a child- Specified by:
appendChildin interfaceNodeInfo
-
removeChild
Description copied from interface:NodeInfoRemoves a child.- Specified by:
removeChildin interfaceNodeInfo
-