Package io.jmix.ui.sys
Class DialogsImpl
java.lang.Object
io.jmix.ui.sys.DialogsImpl
- All Implemented Interfaces:
Dialogs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassclassclassNested classes/interfaces inherited from interface io.jmix.ui.Dialogs
Dialogs.BackgroundWorkDialogBuilder<T extends Number,V>, Dialogs.DialogBuilder<T extends Dialogs.DialogBuilder>, Dialogs.ExceptionDialogBuilder, Dialogs.HasCaption<T>, Dialogs.HasContentMode<T>, Dialogs.HasHtmlSanitizer<T>, Dialogs.HasMessage<T>, Dialogs.HasModal<T>, Dialogs.HasSize<T>, Dialogs.HasStyleName<T>, Dialogs.HasWindowMode<T>, Dialogs.InputDialogBuilder, Dialogs.MessageDialogBuilder, Dialogs.OptionDialogBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected BackgroundWorkerprotected UiComponentPropertiesprotected HtmlSanitizerprotected IconResolverprotected Iconsprotected Messagesprotected ScreenBuildersprotected UiScreenPropertiesprotected AppUI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBackgroundWorkDialog(FrameOwner owner, BackgroundTask backgroundTask) Creates background work dialog builder.createButton(Action action) Creates exception dialog builder.createInputDialog(FrameOwner owner) Creates input dialog builder.Creates message dialog builder.Creates option dialog builder.voidvoidsetScreenBuilders(ScreenBuilders screenBuilders)
-
Field Details
-
messages
-
backgroundWorker
-
iconResolver
-
icons
-
componentProperties
-
screenProperties
-
htmlSanitizer
-
applicationContext
@Autowired protected org.springframework.context.ApplicationContext applicationContext -
ui
-
screenBuilders
-
-
Constructor Details
-
DialogsImpl
public DialogsImpl()
-
-
Method Details
-
setAppUi
-
setScreenBuilders
-
createOptionDialog
Description copied from interface:DialogsCreates option dialog builder.
Example of showing an option dialog:dialogs.createOptionDialog() .withCaption("Question") .withMessage("Do you want to discard data?") .withActions( new DialogAction(DialogAction.Type.YES).withHandler(e -> { // YES option selected }), new DialogAction(DialogAction.Type.NO).withHandler(e -> { // NO option selected }) ) .show();- Specified by:
createOptionDialogin interfaceDialogs- Returns:
- builder
-
createMessageDialog
Description copied from interface:DialogsCreates message dialog builder.
Example of showing a message dialog:dialogs.createMessageDialog() .withCaption("Alert") .withMessage("Report has been saved") .show();- Specified by:
createMessageDialogin interfaceDialogs- Returns:
- builder
-
createExceptionDialog
Description copied from interface:DialogsCreates exception dialog builder.
Example of showing an exception dialog:dialogs.createExceptionDialog() .withCaption("Alert") .withMessage("Report has been saved") .withThrowable(exception) .show();- Specified by:
createExceptionDialogin interfaceDialogs- Returns:
- builder
-
createInputDialog
Description copied from interface:DialogsCreates input dialog builder.Example of showing an input dialog:
dialogs.createInputDialog(this) .withParameters( stringParameter("name").withCaption("Name"), intParameter("count").withCaption("Count")) .withActions(DialogActions.OK_CANCEL) .withCloseListener(closeEvent -> notifications.create(Notifications.NotificationType.TRAY) .withCaption("Dialog is closed") .show()) .withCaption("Goods") .show();- Specified by:
createInputDialogin interfaceDialogs- Parameters:
owner- origin screen from input dialog is invoked- Returns:
- builder
-
createBackgroundWorkDialog
public Dialogs.BackgroundWorkDialogBuilder createBackgroundWorkDialog(FrameOwner owner, BackgroundTask backgroundTask) Description copied from interface:DialogsCreates background work dialog builder.Example of showing a background work dialog:
dialogs.createBackgroundWorkDialog(this, backgroundTask) .withCaption("Task") .withMessage("My Task is Running") .withTotal(total) .withShowProgressInPercentage(true) .withCancelAllowed(true) .show();- Specified by:
createBackgroundWorkDialogin interfaceDialogs- Parameters:
owner- origin screen from the dialog is invoked- Returns:
- builder
-
createButton
-