Package io.jmix.ui.sys
Class DialogsImpl.BackgroundWorkDialogBuilderImpl<T extends Number,V>
java.lang.Object
io.jmix.ui.sys.DialogsImpl.BackgroundWorkDialogBuilderImpl<T,V>
- All Implemented Interfaces:
Dialogs.BackgroundWorkDialogBuilder<T,
,V> Dialogs.HasCaption<Dialogs.BackgroundWorkDialogBuilder<T,
,V>> Dialogs.HasMessage<Dialogs.BackgroundWorkDialogBuilder<T,
V>>
- Enclosing class:
- DialogsImpl
public class DialogsImpl.BackgroundWorkDialogBuilderImpl<T extends Number,V>
extends Object
implements Dialogs.BackgroundWorkDialogBuilder<T,V>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the dialog.getTotal()
boolean
boolean
show()
Shows the dialog.withCancelAllowed
(boolean cancelAllowed) Determines whether the dialog can be closed.withCaption
(String caption) Sets caption text.withMessage
(String message) Sets message text.withShowProgressInPercentage
(boolean percentProgress)
-
Field Details
-
backgroundWorkDialog
-
-
Constructor Details
-
BackgroundWorkDialogBuilderImpl
-
-
Method Details
-
withCancelAllowed
Description copied from interface:Dialogs.BackgroundWorkDialogBuilder
Determines whether the dialog can be closed. False by default.- Specified by:
withCancelAllowed
in interfaceDialogs.BackgroundWorkDialogBuilder<T extends Number,
V> - Parameters:
cancelAllowed
- true if dialog is closeable- Returns:
- builder
-
isCancelAllowed
public boolean isCancelAllowed()- Specified by:
isCancelAllowed
in interfaceDialogs.BackgroundWorkDialogBuilder<T extends Number,
V> - Returns:
- true if the dialog can be closed
-
withTotal
- Specified by:
withTotal
in interfaceDialogs.BackgroundWorkDialogBuilder<T extends Number,
V> - Parameters:
total
- amount of items to be processed by background task, useTaskLifeCycle.publish(Object[])
to notify the dialog about progress completion.- Returns:
- builder
-
getTotal
- Specified by:
getTotal
in interfaceDialogs.BackgroundWorkDialogBuilder<T extends Number,
V> - Returns:
- total
-
withShowProgressInPercentage
public Dialogs.BackgroundWorkDialogBuilder<T,V> withShowProgressInPercentage(boolean percentProgress) - Specified by:
withShowProgressInPercentage
in interfaceDialogs.BackgroundWorkDialogBuilder<T extends Number,
V> - Parameters:
percentProgress
- true if progress should be represented as percentage (rather than as raw number)- Returns:
- builder
-
isShowProgressInPercentage
public boolean isShowProgressInPercentage()- Specified by:
isShowProgressInPercentage
in interfaceDialogs.BackgroundWorkDialogBuilder<T extends Number,
V> - Returns:
- true if progress should is shown in percents
-
withCaption
Description copied from interface:Dialogs.HasCaption
Sets caption text.- Specified by:
withCaption
in interfaceDialogs.HasCaption<T extends Number>
- Parameters:
caption
- caption text- Returns:
- builder
-
getCaption
- Specified by:
getCaption
in interfaceDialogs.HasCaption<T extends Number>
- Returns:
- caption text
-
withMessage
Description copied from interface:Dialogs.HasMessage
Sets message text.- Specified by:
withMessage
in interfaceDialogs.HasMessage<T extends Number>
- Parameters:
message
- message text- Returns:
- builder
-
getMessage
- Specified by:
getMessage
in interfaceDialogs.HasMessage<T extends Number>
- Returns:
- message text
-
show
Description copied from interface:Dialogs.BackgroundWorkDialogBuilder
Shows the dialog.- Specified by:
show
in interfaceDialogs.BackgroundWorkDialogBuilder<T extends Number,
V> - Returns:
- background work dialog
-
build
Description copied from interface:Dialogs.BackgroundWorkDialogBuilder
Builds the dialog.- Specified by:
build
in interfaceDialogs.BackgroundWorkDialogBuilder<T extends Number,
V> - Returns:
- background work dialog
-