Package org.zkoss.zk.ui.metainfo

## Interface WidgetDefinition

- All Known Implementing Classes:
    `WidgetDefinitionImpl`

      public interface WidgetDefinition

  A widget definition. A widget is an UI object at the client.
  Since:
    5.0.0
  Author:
    tomyeh
  See Also:
    `LanguageDefinition.getWidgetDefinition(java.lang.String)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addMold​(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.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).
    `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.

- - ### Method Detail

    - #### getWidgetClass

          java.lang.String getWidgetClass()

      Returns the widget class (a JavaScript class).

    - #### getMoldNames

          java.util.Collection<java.lang.String> getMoldNames()

      Returns a collection of the mold names that have the molde URL.

    - #### hasMold

          boolean hasMold​(java.lang.String name)

      Returns whether the mold URI exists for the given mold.

    - #### addMold

          void addMold​(java.lang.String name,
                       java.lang.String moldURI)

      Adds the mold URI for the specified mold.
      Parameters:
        `name` - the mold name.
        `moldURI` - an URI of the mold. Ignored if null.
      Since:
        5.0.4

    - #### getMoldURI

          java.lang.String getMoldURI​(java.lang.String name)

      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.
      Parameters:
        `name` - the mold name
      Returns:
        an URI in String
      See Also:
        `AbstractComponent.redraw(java.io.Writer)`

    - #### isBlankPreserved

          boolean isBlankPreserved()

      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.