com.holonplatform.vaadin.components

## Interface Dialog.Builder<B extends Dialog.Builder<B>>

- Type Parameters:
    `B` - Concrete builder type
  All Superinterfaces:
    ComponentBuilder<Dialog,B>, ComponentConfigurator<B>
  All Known Subinterfaces:
    Dialog.DialogBuilder, Dialog.QuestionDialogBuilder
  Enclosing interface:
    Dialog

      public static interface Dialog.Builder<B extends Dialog.Builder<B>>
      extends ComponentBuilder<Dialog,B>

  Base dialog builder

- - ### 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 Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `B` | `closable(boolean closable)` Set whether the dialog is closable (i.e. a close button is show in the dialog caption).
    `B` | `content(com.vaadin.ui.Component content)` Sets the content of the dialog.
    `B` | `draggable(boolean draggable)` Set whether the dialog is draggable.
    `B` | `htmlContentAllowed(boolean htmlContentAllowed)` Set whether the dialog messages allow HTML content.
    `B` | `message(com.holonplatform.core.i18n.Localizable message)` Sets the `Localizable` dialog message.
    `default B` | `message(String message)` Sets the dialog message.
    `default B` | `message(String defaultMessage, String messageCode, Object... arguments)` Sets the localizable dialog message.
    `B` | `messageDescriptionStyleName(String messageDescriptionStyleName)` Set the dialog message description style name
    `B` | `messageStyleName(String messageStyleName)` Set the dialog message style name
    `B` | `modal(boolean modal)` Set whether the dialog is modal.
    `default void` | `open()` Build and open the dialog window using given current `UI`.
    `void` | `open(com.vaadin.ui.UI ui)` Build and open the dialog window using given `UI`.
    `B` | `position(int x, int y)` Sets the position of the dialog window on the screen.
    `B` | `resizable(boolean resizable)` Set whether the dialog is resizable.
    `B` | `withCloseListener(Dialog.CloseListener closeListener)` Add a `Dialog.CloseListener` to be notified when dialog is closed
    `B` | `withCloseShortcut(int keyCode, int... modifiers)` Adds a close shortcut - pressing this key while holding down all (if any) modifiers specified while the dialog window is in focus will close the window.

    - ### 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, notVisible, primaryStyleName, replaceStyleName, responsive, sizeUndefined, styleName, width, width, widthUndefined, withAttachListener, withContextClickListener, withData, withDetachListener, withShortcutListener`

- - ### Method Detail

    - #### message

          default B message(String message)

      Sets the dialog message.
      Parameters:
        `message` - The dialog message
      Returns:
        this

    - #### message

          default B message(String defaultMessage,
                            String messageCode,
                            Object... arguments)

      Sets the localizable dialog message.

      For dialog message localization, a `LocalizationContext` must be available and localized as `Context` resource when dialog is displayed.

      Parameters:
        `defaultMessage` - Default dialog message if no translation is available for given `messageCode` for current Locale, or no `LocalizationContext` is available at all
        `messageCode` - Dialog message translation message key
        `arguments` - Optional Dialog message translation arguments
      Returns:
        this

    - #### message

          B message(com.holonplatform.core.i18n.Localizable message)

      Sets the `Localizable` dialog message.

      For message localization, a `LocalizationContext` must be available and localized as `Context` resource when dialog is displayed.

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

    - #### messageStyleName

          B messageStyleName(String messageStyleName)

      Set the dialog message style name
      Parameters:
        `messageStyleName` - the dialog message style name to set
      Returns:
        this

    - #### messageDescriptionStyleName

          B messageDescriptionStyleName(String messageDescriptionStyleName)

      Set the dialog message description style name
      Parameters:
        `messageDescriptionStyleName` - the dialog message description style name to set
      Returns:
        this

    - #### modal

          B modal(boolean modal)

      Set whether the dialog is modal. Default is `true`.
      Parameters:
        `modal` - whether the dialog is modal
      Returns:
        this

    - #### closable

          B closable(boolean closable)

      Set whether the dialog is closable (i.e. a close button is show in the dialog caption). Default is `false`.
      Parameters:
        `closable` - whether the dialog is closable
      Returns:
        this

    - #### resizable

          B resizable(boolean resizable)

      Set whether the dialog is resizable. Default is `false`.
      Parameters:
        `resizable` - whether the dialog is resizable
      Returns:
        this

    - #### draggable

          B draggable(boolean draggable)

      Set whether the dialog is draggable. Default is `false`.
      Parameters:
        `draggable` - whether the dialog is draggable
      Returns:
        this

    - #### htmlContentAllowed

          B htmlContentAllowed(boolean htmlContentAllowed)

      Set whether the dialog messages allow HTML content.
      Parameters:
        `htmlContentAllowed` - `true` to allow HTML content for dialog messages
      Returns:
        this

    - #### withCloseListener

          B withCloseListener(Dialog.CloseListener closeListener)

      Add a `Dialog.CloseListener` to be notified when dialog is closed
      Parameters:
        `closeListener` - The close listener to add (not null)
      Returns:
        this

    - #### content

          B content(com.vaadin.ui.Component content)

      Sets the content of the dialog. If not `null`, the default dialog content will be replaced by the given content.
      Parameters:
        `content` - The component to use as dialog content
      Returns:
        this

    - #### position

          B position(int x,
                     int y)

      Sets the position of the dialog window on the screen.
      Parameters:
        `x` - The x coordinate for the window
        `y` - The y coordinate for the window
      Returns:
        this

    - #### withCloseShortcut

          B withCloseShortcut(int keyCode,
                              int... modifiers)

      Adds a close shortcut - pressing this key while holding down all (if any) modifiers specified while the dialog window is in focus will close the window.
      Parameters:
        `keyCode` - the keycode for invoking the shortcut
        `modifiers` - the (optional) modifiers for invoking the shortcut. Can be set to null to be explicit about not having modifiers.
      Returns:
        this

    - #### open

          void open(com.vaadin.ui.UI ui)

      Build and open the dialog window using given `UI`.
      Parameters:
        `ui` - UI to which to attach the dialog window

    - #### open

          default void open()

      Build and open the dialog window using given current `UI`.

Copyright © 2017 The Holon Platform. All rights reserved.