Package org.zkoss.zk.ui.metainfo
Class WidgetOverride
- java.lang.Object
-
- org.zkoss.zk.ui.metainfo.WidgetListener
-
- org.zkoss.zk.ui.metainfo.WidgetOverride
-
- All Implemented Interfaces:
java.io.Serializable,Condition
public class WidgetOverride extends WidgetListener
Represents a method of the peer widget. UnlikeWidgetListener,WidgetListener.getScript(org.zkoss.zk.ui.Component)must be a complete function declaration:function (arg..) {...}- Since:
- 5.0.0
- Author:
- tomyeh
- See Also:
WidgetListener, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.zk.ui.metainfo.WidgetListener
_name, _script
-
-
Constructor Summary
Constructors Constructor Description WidgetOverride(EvaluatorRef evalr, java.lang.String name, java.lang.String script, ConditionImpl cond)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(Component comp)ConditionImplgetCondition()Returns the effectiveness condition.EvaluatorRefgetEvaluatorRef()Returns the evaluator reference.booleanisEffective(Component comp)Used to evaluate whether it is effective.booleanisEffective(Page page)Used to evaluate whether it is effective.voidsetCondition(ConditionImpl cond)Sets the effectiveness condition.booleanwithCondition()Tests if the condition is set-
Methods inherited from class org.zkoss.zk.ui.metainfo.WidgetListener
getName, getRawScript, getScript
-
-
-
-
Constructor Detail
-
WidgetOverride
public WidgetOverride(EvaluatorRef evalr, java.lang.String name, java.lang.String script, ConditionImpl cond)
- Parameters:
evalr- the evaluator reference used to evaluate the condition.name- the the method name, such as setValue.- Throws:
java.lang.IllegalArgumentException- if script is null or (cond is not null but evalr is null)
-
-
Method Detail
-
assign
public void assign(Component comp)
- Overrides:
assignin classWidgetListener
-
getEvaluatorRef
public EvaluatorRef getEvaluatorRef()
Returns the evaluator reference.
-
getCondition
public ConditionImpl getCondition()
Returns the effectiveness condition.
-
setCondition
public void setCondition(ConditionImpl cond)
Sets the effectiveness condition.
-
withCondition
public boolean withCondition()
Tests if the condition is set
-
isEffective
public boolean isEffective(Component comp)
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
public boolean isEffective(Page page)
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.
-
-