Package io.jmix.flowui.impl
Class DialogsImpl.BackgroundTaskDialogBuilderImpl<T extends Number,V>
java.lang.Object
io.jmix.flowui.impl.DialogsImpl.BackgroundTaskDialogBuilderImpl<T,V>
- All Implemented Interfaces:
Dialogs.BackgroundTaskDialogBuilder<T,,V> Dialogs.Draggable<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>>
- Enclosing class:
- DialogsImpl
public class DialogsImpl.BackgroundTaskDialogBuilderImpl<T extends Number,V>
extends Object
implements Dialogs.BackgroundTaskDialogBuilder<T,V>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BackgroundTask<T,V> protected booleanprotected com.vaadin.flow.component.button.Buttonprotected com.vaadin.flow.component.dialog.Dialogprotected com.vaadin.flow.component.html.Spanprotected Stringprotected com.vaadin.flow.component.progressbar.ProgressBarprotected com.vaadin.flow.component.html.Spanprotected booleanprotected BackgroundTaskHandler<V>protected Number -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.component.dialog.DialogGets the CSS class names for this component.getText()Gets the theme names for this component.getTotal()protected voidprotected voidinitDialog(com.vaadin.flow.component.dialog.Dialog dialog) protected voidinitDialogContent(com.vaadin.flow.component.dialog.Dialog dialog) booleanbooleanprotected booleanbooleanbooleanprotected voidonCancelButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) voidopen()Opens the dialog.protected voidprotected voidupdateProgress(Number processedValue) withCancelAllowed(boolean cancelAllowed) Determines whether the dialog can be closed.withClassName(String className) Sets the CSS class names of this component.withDraggable(boolean draggable) Sets whether dialog is enabled to be dragged by the user or not.withHeader(String header) Sets a header text.withMaxHeight(String maxHeight) Sets a dialog max height.withMaxWidth(String maxWidth) Sets a dialog max width.withMinHeight(String minHeight) Sets a dialog min height.withMinWidth(String minWidth) Sets a dialog min width.withResizable(boolean resizable) Sets whether dialog can be resized by user or not.withShowProgressInPercentage(boolean percentProgress) Sets whether progress should be represented as percentage (rather than as raw number).Sets a text.withThemeName(String themeName) Sets the theme names of the dialog.Sets amount of items to be processed by background task.
-
Field Details
-
dialog
protected com.vaadin.flow.component.dialog.Dialog dialog -
messageSpan
protected com.vaadin.flow.component.html.Span messageSpan -
progressTextSpan
protected com.vaadin.flow.component.html.Span progressTextSpan -
progressBar
protected com.vaadin.flow.component.progressbar.ProgressBar progressBar -
cancelButton
protected com.vaadin.flow.component.button.Button cancelButton -
backgroundTask
-
messageText
-
total
-
showProgressInPercentage
protected boolean showProgressInPercentage -
cancelAllowed
protected boolean cancelAllowed -
taskHandler
-
-
Constructor Details
-
BackgroundTaskDialogBuilderImpl
-
-
Method Details
-
createDialog
protected com.vaadin.flow.component.dialog.Dialog createDialog() -
initDialog
protected void initDialog(com.vaadin.flow.component.dialog.Dialog dialog) -
initDialogContent
protected void initDialogContent(com.vaadin.flow.component.dialog.Dialog dialog) -
withCancelAllowed
Description copied from interface:Dialogs.BackgroundTaskDialogBuilderDetermines whether the dialog can be closed.The default value is
false.- Specified by:
withCancelAllowedin interfaceDialogs.BackgroundTaskDialogBuilder<T extends Number,V> - Parameters:
cancelAllowed-trueif dialog is closeable- Returns:
- builder
-
isCancelAllowed
public boolean isCancelAllowed()- Specified by:
isCancelAllowedin interfaceDialogs.BackgroundTaskDialogBuilder<T extends Number,V> - Returns:
trueif the dialog can be closed
-
withTotal
Description copied from interface:Dialogs.BackgroundTaskDialogBuilderSets amount of items to be processed by background task.
UseTaskLifeCycle.publish(Object[])to notify the dialog about progress completion.- Specified by:
withTotalin interfaceDialogs.BackgroundTaskDialogBuilder<T extends Number,V> - Parameters:
total- amount of items to be processed by background task,- Returns:
- builder
-
getTotal
- Specified by:
getTotalin interfaceDialogs.BackgroundTaskDialogBuilder<T extends Number,V> - Returns:
- amount of items to be processed by background task
-
withShowProgressInPercentage
public Dialogs.BackgroundTaskDialogBuilder<T,V> withShowProgressInPercentage(boolean percentProgress) Description copied from interface:Dialogs.BackgroundTaskDialogBuilderSets whether progress should be represented as percentage (rather than as raw number).- Specified by:
withShowProgressInPercentagein interfaceDialogs.BackgroundTaskDialogBuilder<T extends Number,V> - Parameters:
percentProgress-trueto show progress in percents- Returns:
- builder
-
isShowProgressInPercentage
public boolean isShowProgressInPercentage()- Specified by:
isShowProgressInPercentagein interfaceDialogs.BackgroundTaskDialogBuilder<T extends Number,V> - Returns:
trueif progress should is shown in percents
-
withHeader
Description copied from interface:Dialogs.HasHeaderSets a header text.- Specified by:
withHeaderin interfaceDialogs.HasHeader<T extends Number>- Parameters:
header- header text- Returns:
- builder
-
getHeader
- Specified by:
getHeaderin interfaceDialogs.HasHeader<T extends Number>- Returns:
- header text
-
withText
Description copied from interface:Dialogs.HasTextSets a text.- Specified by:
withTextin interfaceDialogs.HasText<T extends Number>- Parameters:
text- a text- Returns:
- builder
-
getText
- Specified by:
getTextin interfaceDialogs.HasText<T extends Number>- Returns:
- a text
-
withThemeName
Description copied from interface:Dialogs.HasThemeSets the theme names of the dialog. This method overwrites any previous set theme names.- Specified by:
withThemeNamein interfaceDialogs.HasTheme<T extends Number>- Parameters:
themeName- a space-separated string of theme names to set, or empty string to remove all theme names- Returns:
- builder
-
getThemeName
Description copied from interface:Dialogs.HasThemeGets the theme names for this component.- Specified by:
getThemeNamein interfaceDialogs.HasTheme<T extends Number>- Returns:
- a space-separated string of theme names, empty string if there are no theme names
or
nullif attribute (theme) is not set at all
-
withClassName
Description copied from interface:Dialogs.HasStyleSets the CSS class names of this component. This method overwrites any previous set class names.- Specified by:
withClassNamein interfaceDialogs.HasStyle<T extends Number>- Parameters:
className- a space-separated string of class names to set, ornullto remove all class names
-
getClassName
Description copied from interface:Dialogs.HasStyleGets the CSS class names for this component.- Specified by:
getClassNamein interfaceDialogs.HasStyle<T extends Number>- Returns:
- a space-separated string of class names, or
nullif there are no class names
-
withDraggable
Description copied from interface:Dialogs.DraggableSets whether dialog is enabled to be dragged by the user or not.- Specified by:
withDraggablein interfaceDialogs.Draggable<T extends Number>- Parameters:
draggable-trueto enable dragging of the dialog,falseotherwise- Returns:
- builder
-
isDraggable
public boolean isDraggable()- Specified by:
isDraggablein interfaceDialogs.Draggable<T extends Number>- Returns:
trueif dragging is enabled,falseotherwise
-
withResizable
Description copied from interface:Dialogs.ResizableSets whether dialog can be resized by user or not.By default, the dialog is not resizable.
- Specified by:
withResizablein interfaceDialogs.Resizable<T extends Number>- Parameters:
resizable-trueto enabled resizing of the dialog,falseotherwise.- Returns:
- builder
-
isResizable
public boolean isResizable()- Specified by:
isResizablein interfaceDialogs.Resizable<T extends Number>- Returns:
trueif resizing is enabled,falseotherwise
-
withMinWidth
Description copied from interface:Dialogs.ResizableSets a dialog min width.- Specified by:
withMinWidthin interfaceDialogs.Resizable<T extends Number>- Parameters:
minWidth- a dialog min width- Returns:
- builder
-
getMinWidth
- Specified by:
getMinWidthin interfaceDialogs.Resizable<T extends Number>- Returns:
- dialog min width value
-
withMinHeight
Description copied from interface:Dialogs.ResizableSets a dialog min height.- Specified by:
withMinHeightin interfaceDialogs.Resizable<T extends Number>- Parameters:
minHeight- a dialog min height- Returns:
- builder
-
getMinHeight
- Specified by:
getMinHeightin interfaceDialogs.Resizable<T extends Number>- Returns:
- dialog min height value
-
withMaxWidth
Description copied from interface:Dialogs.ResizableSets a dialog max width.- Specified by:
withMaxWidthin interfaceDialogs.Resizable<T extends Number>- Parameters:
maxWidth- a dialog max width- Returns:
- builder
-
getMaxWidth
- Specified by:
getMaxWidthin interfaceDialogs.Resizable<T extends Number>- Returns:
- dialog max width value
-
withMaxHeight
Description copied from interface:Dialogs.ResizableSets a dialog max height.- Specified by:
withMaxHeightin interfaceDialogs.Resizable<T extends Number>- Parameters:
maxHeight- a dialog max height- Returns:
- builder
-
getMaxHeight
- Specified by:
getMaxHeightin interfaceDialogs.Resizable<T extends Number>- Returns:
- dialog max height value
-
open
public void open()Description copied from interface:Dialogs.BackgroundTaskDialogBuilderOpens the dialog.- Specified by:
openin interfaceDialogs.BackgroundTaskDialogBuilder<T extends Number,V>
-
isIndeterminateMode
protected boolean isIndeterminateMode() -
startExecution
protected void startExecution() -
updateProgress
-
onCancelButtonClick
protected void onCancelButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
handleTaskWrapperCloseView
-