Interface Dialogs.BackgroundTaskDialogBuilder<T extends Number,V>

All Superinterfaces:
Dialogs.Draggable<Dialogs.BackgroundTaskDialogBuilder<T,V>>, Dialogs.HasContent<Dialogs.BackgroundTaskDialogBuilder<T,V>>, Dialogs.HasHeader<Dialogs.BackgroundTaskDialogBuilder<T,V>>, Dialogs.HasStyle<Dialogs.BackgroundTaskDialogBuilder<T,V>>, Dialogs.HasText<Dialogs.BackgroundTaskDialogBuilder<T,V>>, Dialogs.HasTheme<Dialogs.BackgroundTaskDialogBuilder<T,V>>, Dialogs.Resizable<Dialogs.BackgroundTaskDialogBuilder<T,V>>
All Known Implementing Classes:
DialogsImpl.BackgroundTaskDialogBuilderImpl
Enclosing interface:
Dialogs

Builder of background task dialog.
  • Method Details

    • withCancelAllowed

      Dialogs.BackgroundTaskDialogBuilder<T,V> withCancelAllowed(boolean cancelAllowed)
      Determines whether the dialog can be closed.

      The default value is false.

      Parameters:
      cancelAllowed - true if dialog is closeable
      Returns:
      builder
    • isCancelAllowed

      boolean isCancelAllowed()
      Returns:
      true if the dialog can be closed
    • withTotal

      Sets amount of items to be processed by background task.
      Use TaskLifeCycle.publish(Object[]) to notify the dialog about progress completion.
      Parameters:
      total - amount of items to be processed by background task,
      Returns:
      builder
    • getTotal

      Number getTotal()
      Returns:
      amount of items to be processed by background task
    • withShowProgressInPercentage

      Dialogs.BackgroundTaskDialogBuilder<T,V> withShowProgressInPercentage(boolean percentProgress)
      Sets whether progress should be represented as percentage (rather than as raw number).
      Parameters:
      percentProgress - true to show progress in percents
      Returns:
      builder
    • isShowProgressInPercentage

      boolean isShowProgressInPercentage()
      Returns:
      true if progress should is shown in percents
    • build

      com.vaadin.flow.component.dialog.Dialog build()
      Build the background task dialog. Dialog should be shown using Dialog.open().
      Returns:
      built background task dialog.
    • open

      com.vaadin.flow.component.dialog.Dialog open()
      Opens the background task dialog.