org.zkoss.zk.ui.metainfo.impl
Class WidgetDefinitionImpl

java.lang.Object
  extended by 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
WidgetDefinitionImpl(java.lang.String klass, boolean blankPreserved)
           
 
Method Summary
 void addMold(java.lang.String name, java.lang.String moldURI, java.lang.String cssURI, java.lang.String z2cURI)
          Adds the mold URI for the specified mold.
 java.lang.String getCSSURI(java.lang.String name)
          Returns the URI (String) of the CSS file of the mold, or null if not available.
 java.util.Collection getMoldNames()
          Returns a collection of the mold names that have the molde URL.
 java.lang.String getMoldURI(java.lang.String name)
          Returns the URI (String) of the template to generate the mold, or null if not available.
 java.lang.String getWidgetClass()
          Returns the widget class (a JavaScript class).
 java.lang.String getZ2CURI(java.lang.String name)
          Returns the URI (String) of the Z2C file of the mold, or null if not available.
 boolean hasMold(java.lang.String name)
          Returns whether the mold URI exists for the given mold.
 boolean isBlankPreserved()
          Returns whether to preserve the blank text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetDefinitionImpl

public WidgetDefinitionImpl(java.lang.String klass,
                            boolean blankPreserved)
Method Detail

getWidgetClass

public java.lang.String getWidgetClass()
Description copied from interface: WidgetDefinition
Returns the widget class (a JavaScript class).

Specified by:
getWidgetClass in interface WidgetDefinition

isBlankPreserved

public boolean isBlankPreserved()
Description copied from interface: WidgetDefinition
Returns 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:
isBlankPreserved in interface WidgetDefinition

addMold

public void addMold(java.lang.String name,
                    java.lang.String moldURI,
                    java.lang.String cssURI,
                    java.lang.String z2cURI)
Description copied from interface: WidgetDefinition
Adds the mold URI for the specified mold.

Specified by:
addMold in interface WidgetDefinition
Parameters:
name - the mold name.
moldURI - an URI of the mold. Ignored if null.
cssURI - an URI of the CSS. Ignored if null.
z2cURI - an URI of the ZCS-to-CSS converter. Not supported yet. Since 5.0, it doesn't allow any XEL expressions.

getMoldURI

public java.lang.String getMoldURI(java.lang.String name)
Description copied from interface: WidgetDefinition
Returns 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:
getMoldURI in interface WidgetDefinition
Parameters:
name - the mold name
Returns:
an URI in String
See Also:
AbstractComponent.redraw(java.io.Writer)

getCSSURI

public java.lang.String getCSSURI(java.lang.String name)
Description copied from interface: WidgetDefinition
Returns the URI (String) of the CSS file of the mold, or null if not available.

Specified by:
getCSSURI in interface WidgetDefinition
Parameters:
name - the mold name
Returns:
an URI in String

getZ2CURI

public java.lang.String getZ2CURI(java.lang.String name)
Description copied from interface: WidgetDefinition
Returns the URI (String) of the Z2C file of the mold, or null if not available.

Specified by:
getZ2CURI in interface WidgetDefinition
Parameters:
name - the mold name
Returns:
an URI in String

hasMold

public boolean hasMold(java.lang.String name)
Description copied from interface: WidgetDefinition
Returns whether the mold URI exists for the given mold.

Specified by:
hasMold in interface WidgetDefinition

getMoldNames

public java.util.Collection getMoldNames()
Description copied from interface: WidgetDefinition
Returns a collection of the mold names that have the molde URL.

Specified by:
getMoldNames in interface WidgetDefinition


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo