org.zkoss.zk.ui.metainfo
Class AttributesInfo

java.lang.Object
  extended by org.zkoss.zk.ui.metainfo.AttributesInfo
All Implemented Interfaces:
java.io.Serializable, Condition

public class AttributesInfo
extends java.lang.Object
implements Condition, java.io.Serializable

Represents a map of custom attributes of a component definition (ComponentDefinition). It is equivalent to the custom-attributes element.

Note: it is serializable.

Author:
tomyeh
See Also:
Serialized Form

Constructor Summary
AttributesInfo(EvaluatorRef evalr, java.util.Map attrs, java.lang.String scope, ConditionImpl cond)
           
 
Method Summary
 void apply(Component comp)
          Applies the custom attributes.
 void apply(Page page)
          Applies the custom attributes.
 boolean isEffective(Component comp)
          Used to evaluate whether it is effective.
 boolean isEffective(Page page)
          Used to evaluate whether it is effective.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributesInfo

public AttributesInfo(EvaluatorRef evalr,
                      java.util.Map attrs,
                      java.lang.String scope,
                      ConditionImpl cond)
Parameters:
evalr - the evaluator reference. It cannot be null. Retrieve it from LanguageDefinition.getEvaluatorRef() or PageDefinition.getEvaluatorRef(), depending which it belongs.
attrs - the custom attributes (String name, String value). Once called, the caller shall not access attrs again -- it belongs to this object.
Method Detail

apply

public void apply(Component comp)
Applies the custom attributes.

Note: this method does nothing if isEffective(org.zkoss.zk.ui.Component) returns false.


apply

public void apply(Page page)
Applies the custom attributes.

Note: this method does nothing if isEffective(org.zkoss.zk.ui.Component) returns false.


isEffective

public boolean isEffective(Component comp)
Description copied from interface: Condition
Used to evaluate whether it is effective.

Specified by:
isEffective in interface Condition
Parameters:
comp - used as the self variable. Ignored if null.

isEffective

public boolean isEffective(Page page)
Description copied from interface: Condition
Used to evaluate whether it is effective.

Specified by:
isEffective in interface Condition
Parameters:
page - used as the self variable. Ignored if null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.