com.holonplatform.vaadin.flow.components.builders

## Interface DialogBuilder<B extends DialogBuilder<B>>

- Type Parameters:
    `B` - Concrete builder type
  All Superinterfaces:
    ComponentConfigurator<B>, DeferrableLocalizationConfigurator<B>, DialogConfigurator<B>, HasDeferrableLocalization, HasElementConfigurator<B>, HasSizeConfigurator<B>, HasStyleConfigurator<B>, HasTextConfigurator<B>
  All Known Subinterfaces:
    DialogBuilder.ConfirmDialogBuilder, DialogBuilder.MessageDialogBuilder, DialogBuilder.QuestionDialogBuilder

      public interface DialogBuilder<B extends DialogBuilder<B>>
      extends DialogConfigurator<B>

  `Dialog` component builder.
  Since:
    5.2.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `DialogBuilder.ConfirmDialogBuilder` Confirm `Dialog` builder.
    `static interface` | `DialogBuilder.MessageDialogBuilder` Default message `Dialog` builder.
    `static interface` | `DialogBuilder.QuestionDialogBuilder` Question `Dialog` builder.
    `static interface` | `DialogBuilder.QuestionDialogCallback` Question dialog user answer callback.

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

      `DialogConfigurator.ClosableDialogConfigurator<C extends DialogConfigurator.ClosableDialogConfigurator<C>>`

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

      `ComponentConfigurator.BaseComponentConfigurator`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_CONFIRM_BUTTON_MESSAGE_CODE` Default confirm question dialog button message code.
    `static String` | `DEFAULT_DENY_BUTTON_MESSAGE_CODE` Default deny question dialog button message code.
    `static String` | `DEFAULT_OK_BUTTON_MESSAGE_CODE` Default ok confirm dialog button message code.

    - ### Fields inherited from interface com.holonplatform.vaadin.flow.components.builders.HasSizeConfigurator

      `FULL_SIZE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.vaadin.flow.component.dialog.Dialog` | `build()` Build the `Dialog` component.
    `static DialogBuilder.ConfirmDialogBuilder` | `confirm()` Get a builder to create a message dialog with a OK button in the dialog toolbar which can be used to close the dialog.
    `static DialogBuilder.MessageDialogBuilder` | `message()` Get a builder to create a generic message dialog.
    `default com.vaadin.flow.component.dialog.Dialog` | `open()` Build the `Dialog` component and open it.
    `static DialogBuilder.QuestionDialogBuilder` | `question(DialogBuilder.QuestionDialogCallback questionDialogCallback)` Get a builder to create a question dialog, with a confirm button and a deny button in the dialog toolbar which will trigger the given `questionDialogCallback` to react to the user choice.

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

      `withComponent, withOpenedChangeListener, withToolbarComponent`

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

      `hidden, id, visible, withAttachListener, withDetachListener`

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

      `withEventListener, withEventListener, withThemeName`

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

      `fullHeight, fullSize, fullWidth, height, height, heightUndefined, sizeUndefined, width, width, widthUndefined`

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

      `styleName, styleNames`

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

      `text, text, text`

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

      `deferLocalization, withDeferredLocalization`

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

      `isDeferredLocalizationEnabled`

- - ### Field Detail

    - #### DEFAULT_OK_BUTTON_MESSAGE_CODE

          static final String DEFAULT_OK_BUTTON_MESSAGE_CODE

      Default ok confirm dialog button message code.
      See Also:
        Constant Field Values

    - #### DEFAULT_CONFIRM_BUTTON_MESSAGE_CODE

          static final String DEFAULT_CONFIRM_BUTTON_MESSAGE_CODE

      Default confirm question dialog button message code.
      See Also:
        Constant Field Values

    - #### DEFAULT_DENY_BUTTON_MESSAGE_CODE

          static final String DEFAULT_DENY_BUTTON_MESSAGE_CODE

      Default deny question dialog button message code.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### build

          com.vaadin.flow.component.dialog.Dialog build()

      Build the `Dialog` component.
      Returns:
        The `Dialog` instance

    - #### open

          default com.vaadin.flow.component.dialog.Dialog open()

      Build the `Dialog` component and open it.
      Returns:
        The `Dialog` instance

    - #### message

          static DialogBuilder.MessageDialogBuilder message()

      Get a builder to create a generic message dialog.
      Returns:
        A new `DialogBuilder.MessageDialogBuilder`

    - #### confirm

          static DialogBuilder.ConfirmDialogBuilder confirm()

      Get a builder to create a message dialog with a OK button in the dialog toolbar which can be used to close the dialog.

      The default OK button message localization code is `DEFAULT_OK_BUTTON_MESSAGE_CODE`.

      Returns:
        A new `DialogBuilder.ConfirmDialogBuilder`

    - #### question

          static DialogBuilder.QuestionDialogBuilder question(DialogBuilder.QuestionDialogCallback questionDialogCallback)

      Get a builder to create a question dialog, with a confirm button and a deny button in the dialog toolbar which will trigger the given `questionDialogCallback` to react to the user choice.

      The default confirm button message localization code is `DEFAULT_CONFIRM_BUTTON_MESSAGE_CODE`. The default deny button message localization code is `DEFAULT_DENY_BUTTON_MESSAGE_CODE`.

      Parameters:
        `questionDialogCallback` - The callback function use to react to the user selection (not null)
      Returns:
        A new `DialogBuilder.QuestionDialogBuilder`

Copyright © 2019 The Holon Platform. All rights reserved.