com.holonplatform.vaadin.components.builders

## Interface LabelBuilder

- All Superinterfaces:
    ComponentBuilder<com.vaadin.ui.Label,LabelBuilder>, ComponentConfigurator<LabelBuilder>

      public interface LabelBuilder
      extends ComponentBuilder<com.vaadin.ui.Label,LabelBuilder>

  Builder to create `Label` instances.

  Note that, differently from default `Label` constructor, the width is not setted to 100% by default, but it is leaved undefined.

  Since:
    5.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.components.builders.ComponentConfigurator

      `ComponentConfigurator.BaseComponentConfigurator`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `LabelBuilder` | `content(com.holonplatform.core.i18n.Localizable content)` Sets the label content using a `Localizable` message.
    `LabelBuilder` | `content(String content)` Sets the label content
    `LabelBuilder` | `content(String defaultContent, String messageCode, Object... arguments)` Sets the label content using a localizable `messageCode`.
    `LabelBuilder` | `contentMode(com.vaadin.shared.ui.label.ContentMode contentMode)` Sets the content mode of the Label.
    `LabelBuilder` | `html()` A shortcut to set the content mode to `ContentMode.HTML`

    - ### Methods inherited from interface com.holonplatform.vaadin.components.builders.ComponentBuilder

      `build, deferLocalization`

    - ### Methods inherited from interface com.holonplatform.vaadin.components.builders.ComponentConfigurator

      `caption, caption, caption, captionAsHtml, description, description, description, disabled, errorHandler, fullHeight, fullSize, fullWidth, height, height, heightUndefined, hidden, icon, id, immediate, notVisible, primaryStyleName, replaceStyleName, responsive, sizeUndefined, styleName, width, width, widthUndefined, withAttachListener, withContextClickListener, withData, withDetachListener, withShortcutListener`

- - ### Method Detail

    - #### content

          LabelBuilder content(String content)

      Sets the label content
      Parameters:
        `content` - The content to set
      Returns:
        this

    - #### content

          LabelBuilder content(String defaultContent,
                               String messageCode,
                               Object... arguments)

      Sets the label content using a localizable `messageCode`.

      For content localization, a `LocalizationContext` must be available and localized as `Context` resource when component is built or when component is displayed if `ComponentBuilder.deferLocalization()` is `true`.

      Parameters:
        `defaultContent` - Default content if no translation is available for given `messageCode` for current Locale.
        `messageCode` - Content translation message key
        `arguments` - Optional translation arguments
      Returns:
        this

    - #### content

          LabelBuilder content(com.holonplatform.core.i18n.Localizable content)

      Sets the label content using a `Localizable` message.

      For content localization, a `LocalizationContext` must be available and localized as `Context` resource when component is built or when component is displayed if `ComponentBuilder.deferLocalization()` is `true`.

      Parameters:
        `content` - Localizable content message
      Returns:
        this

    - #### contentMode

          LabelBuilder contentMode(com.vaadin.shared.ui.label.ContentMode contentMode)

      Sets the content mode of the Label.
      Parameters:
        `contentMode` - The content mode to set
      Returns:
        this

    - #### html

          LabelBuilder html()

      A shortcut to set the content mode to `ContentMode.HTML`
      Returns:
        this

Copyright © 2017 The Holon Platform. All rights reserved.