Package org.zkoss.zk.ui.metainfo.impl
Class WidgetDefinitionImpl
- java.lang.Object
-
- org.zkoss.zk.ui.metainfo.impl.WidgetDefinitionImpl
-
- All Implemented Interfaces:
WidgetDefinition
public class WidgetDefinitionImpl extends java.lang.Object implements WidgetDefinition
An implementation of WidgetDefinition.- Since:
- 5.0.0
- Author:
- tomyeh
-
-
Constructor Summary
Constructors Constructor Description WidgetDefinitionImpl(java.lang.String klass, boolean blankPreserved)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMold(java.lang.String name, java.lang.String moldURI)Adds the mold URI for the specified mold.java.util.Collection<java.lang.String>getMoldNames()Returns a collection of the mold names that have the molde URL.java.lang.StringgetMoldURI(java.lang.String name)Returns the URI (String) of the template to generate the mold, or null if not available.java.lang.StringgetWidgetClass()Returns the widget class (a JavaScript class).booleanhasMold(java.lang.String name)Returns whether the mold URI exists for the given mold.booleanisBlankPreserved()Returns whether to preserve the blank text.
-
-
-
Method Detail
-
getWidgetClass
public java.lang.String getWidgetClass()
Description copied from interface:WidgetDefinitionReturns the widget class (a JavaScript class).- Specified by:
getWidgetClassin interfaceWidgetDefinition
-
isBlankPreserved
public boolean isBlankPreserved()
Description copied from interface:WidgetDefinitionReturns whether to preserve the blank text. If false, the blank text (a non-empty string consisting of whitespaces) are ignored. If true, they are converted to a label child.It is used only with iZUML.
- Specified by:
isBlankPreservedin interfaceWidgetDefinition
-
addMold
public void addMold(java.lang.String name, java.lang.String moldURI)Description copied from interface:WidgetDefinitionAdds the mold URI for the specified mold.- Specified by:
addMoldin interfaceWidgetDefinition- Parameters:
name- the mold name.moldURI- an URI of the mold. Ignored if null.
-
getMoldURI
public java.lang.String getMoldURI(java.lang.String name)
Description copied from interface:WidgetDefinitionReturns the URI (String) of the template to generate the mold, or null if not available. For Ajax clients, the template is a JavaScript method.- Specified by:
getMoldURIin interfaceWidgetDefinition- Parameters:
name- the mold name- Returns:
- an URI in String
- See Also:
AbstractComponent.redraw(java.io.Writer)
-
hasMold
public boolean hasMold(java.lang.String name)
Description copied from interface:WidgetDefinitionReturns whether the mold URI exists for the given mold.- Specified by:
hasMoldin interfaceWidgetDefinition
-
getMoldNames
public java.util.Collection<java.lang.String> getMoldNames()
Description copied from interface:WidgetDefinitionReturns a collection of the mold names that have the molde URL.- Specified by:
getMoldNamesin interfaceWidgetDefinition
-
-