|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.zk.ui.metainfo.AttributesInfo
public class AttributesInfo
Represents a map of custom attributes of a component definition
(ComponentDefinition
).
It is equivalent to the custom-attributes element.
Note: it is serializable.
Constructor Summary | |
---|---|
AttributesInfo(EvaluatorRef evalr,
java.util.Map attrs,
java.lang.String scope,
ConditionImpl cond)
The same as AttributesInfo(evalr, attrs, scope, "none", cond). |
|
AttributesInfo(EvaluatorRef evalr,
java.util.Map attrs,
java.lang.String scope,
java.lang.String composite,
ConditionImpl cond)
Constructor. |
Method Summary | |
---|---|
void |
apply(Component comp)
Applies the custom attributes. |
void |
apply(Page page)
Applies the custom attributes. |
java.lang.String |
getComposite()
Returns the composite type: "none", "list" or "map". |
java.lang.String |
getScope()
Returns the scope. |
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 |
---|
public AttributesInfo(EvaluatorRef evalr, java.util.Map attrs, java.lang.String scope, java.lang.String composite, ConditionImpl cond)
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.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 evalr is null,
or the composite type is illegal.public AttributesInfo(EvaluatorRef evalr, java.util.Map attrs, java.lang.String scope, ConditionImpl cond)
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.scope
- specifies the scope.
java.lang.IllegalArgumentException
- if evalr is nullMethod Detail |
---|
public java.lang.String getScope()
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 boolean isEffective(Component comp)
Condition
isEffective
in interface Condition
comp
- used as the self variable. Ignored if null.public boolean isEffective(Page page)
Condition
isEffective
in interface Condition
page
- used as the self variable. Ignored if null.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |