com.holonplatform.vaadin.components

## Interface Dialog

- All Superinterfaces:
    com.vaadin.server.ClientConnector, com.vaadin.ui.Component, com.vaadin.shared.Connector, Serializable, com.vaadin.server.Sizeable

      public interface Dialog
      extends com.vaadin.ui.Component

  Dialog window representation.
  Since:
    5.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `Dialog.Builder<B extends Dialog.Builder<B>>` Base dialog builder
    `static interface` | `Dialog.CloseListener` Listener for dialog closing event
    `static interface` | `Dialog.DialogBuilder` Default `Dialog` builder.
    `static interface` | `Dialog.DialogButtonConfigurator` Interface to configure `Dialog` buttons at build time.
    `static interface` | `Dialog.QuestionCallback` `Dialog.CloseListener` extension which acts as callback for a question dialog to react to the user's response.
    `static interface` | `Dialog.QuestionDialogBuilder` Question `Dialog` builder.

    - ### Nested classes/interfaces inherited from interface com.vaadin.ui.Component

      `com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener`

    - ### Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector

      `com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener`

    - ### Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable

      `com.vaadin.server.Sizeable.Unit`

  - ### Field Summary

    - ### Fields inherited from interface com.vaadin.server.Sizeable

      `SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.vaadin.shared.Registration` | `addCloseListener(Dialog.CloseListener listener)` Adds a `Dialog.CloseListener` for dialog closing events.
    `void` | `bringToFront()` If there are currently several window dialogs visible, calling this method makes this dialog window topmost.
    `static Dialog.DialogBuilder` | `builder()` Gets a builder to create and open a `Dialog` window.
    `void` | `close()` Closes the dialog window
    `boolean` | `isModal()` Returns whether the dialog is modal.
    `default void` | `open()` Open the dialog window using current `UI`.
    `void` | `open(com.vaadin.ui.UI ui)` Open the dialog window using given `UI`.
    `static Dialog.QuestionDialogBuilder` | `question()` Gets a builder to create and open a question `Dialog` window.
    `void` | `setModal(boolean modal)` Sets whether the dialog is modal.

    - ### Methods inherited from interface com.vaadin.ui.Component

      `addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesign`

    - ### Methods inherited from interface com.vaadin.server.ClientConnector

      `addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler`

    - ### Methods inherited from interface com.vaadin.shared.Connector

      `getConnectorId`

    - ### Methods inherited from interface com.vaadin.server.Sizeable

      `getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined`

- - ### Method Detail

    - #### isModal

          boolean isModal()

      Returns whether the dialog is modal.
      Returns:
        `true` if the dialog is modal, `false` otherwise

    - #### setModal

          void setModal(boolean modal)

      Sets whether the dialog is modal. When a modal dialog is open, components outside that dialog window cannot be accessed.
      Parameters:
        `modal` - `true` to set the dialog as modal, `false` to unset

    - #### bringToFront

          void bringToFront()

      If there are currently several window dialogs visible, calling this method makes this dialog window topmost.

      This method can only be called if this dialog is connected to a UI. Else an illegal state exception is thrown. Also if there are modal windows and this dialog window is not modal, and illegal state exception is thrown.

    - #### open

          default void open()

      Open the dialog window using current `UI`.

    - #### open

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

      Open the dialog window using given `UI`.
      Parameters:
        `ui` - UI to which to attach the dialog window

    - #### close

          void close()

      Closes the dialog window

    - #### addCloseListener

          com.vaadin.shared.Registration addCloseListener(Dialog.CloseListener listener)

      Adds a `Dialog.CloseListener` for dialog closing events.
      Parameters:
        `listener` - The listener to add (not null)
      Returns:
        the listener `Registration`

    - #### builder

          static Dialog.DialogBuilder builder()

      Gets a builder to create and open a `Dialog` window.

      The dialog will present by default a single ok button.

      Returns:
        `Dialog` builder

    - #### question

          static Dialog.QuestionDialogBuilder question()

      Gets a builder to create and open a question `Dialog` window.

      The dialog will present by default a yes and a no button. Use `Dialog.QuestionDialogBuilder.callback(com.holonplatform.vaadin.components.Dialog.QuestionCallback)` to handle the user selected answer.

      Returns:
        Question `Dialog` builder

Copyright © 2019 The Holon Platform. All rights reserved.