Package org.zkoss.zk.ui.metainfo
Class TextInfo
- java.lang.Object
-
- org.zkoss.zk.ui.metainfo.TextInfo
-
- All Implemented Interfaces:
java.io.Serializable,NodeInfo
public class TextInfo extends java.lang.ObjectRepresents a text.- Since:
- 3.0.0
- Author:
- tomyeh
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TextInfo(java.lang.String text)ConstructorTextInfo(NodeInfo parent, java.lang.String text)TextInfo(EvaluatorRef evalr, java.lang.String text)ZK-5695: Mainly used in NativeInfo.addPrologChild() when escaping special characters inside a script tag is required, ensuring a new TextInfo instance preserving evaluator context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendChild(NodeInfo child)Append a childjava.util.List<NodeInfo>getChildren()Returns a readonly list of children.EvaluatorgetEvaluator()Returns the evaluator.EvaluatorRefgetEvaluatorRef()Returns the evaluator reference.PageDefinitiongetPageDefinition()Returns the page definition, i.e., the root node, or null if not available.NodeInfogetParent()Returns the parent, or null if it has no parent.java.lang.StringgetRawValue()Returns the raw value (text).java.lang.StringgetValue(Component comp)Returns the value after evaluation.java.lang.StringgetValue(Page page)Returns the value after evaluation (might be null).booleanremoveChild(NodeInfo child)Removes a child.java.lang.StringtoString()
-
-
-
Constructor Detail
-
TextInfo
public TextInfo(java.lang.String text)
Constructor- Since:
- 6.0.0
-
TextInfo
public TextInfo(NodeInfo parent, java.lang.String text)
-
TextInfo
public TextInfo(EvaluatorRef evalr, java.lang.String text)
ZK-5695: Mainly used in NativeInfo.addPrologChild() when escaping special characters inside a script tag is required, ensuring a new TextInfo instance preserving evaluator context.- Since:
- 10.2.0
-
-
Method Detail
-
getRawValue
public java.lang.String getRawValue()
Returns the raw value (text).
-
getValue
public java.lang.String getValue(Page page)
Returns the value after evaluation (might be null).
-
getValue
public java.lang.String getValue(Component comp)
Returns the value after evaluation.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getEvaluatorRef
public EvaluatorRef getEvaluatorRef()
Description copied from interface:NodeInfoReturns the evaluator reference.- Specified by:
getEvaluatorRefin interfaceNodeInfo
-
getPageDefinition
public PageDefinition getPageDefinition()
Description copied from interface:NodeInfoReturns the page definition, i.e., the root node, or null if not available.- Specified by:
getPageDefinitionin interfaceNodeInfo
-
getEvaluator
public Evaluator 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
public NodeInfo getParent()
Description copied from interface:NodeInfoReturns the parent, or null if it has no parent.
-
getChildren
public java.util.List<NodeInfo> 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
public void appendChild(NodeInfo child)
Description copied from interface:NodeInfoAppend a child- Specified by:
appendChildin interfaceNodeInfo
-
removeChild
public boolean removeChild(NodeInfo child)
Description copied from interface:NodeInfoRemoves a child.- Specified by:
removeChildin interfaceNodeInfo
-
-