Package io.jmix.ui.sys
Class DialogsImpl
java.lang.Object
io.jmix.ui.sys.DialogsImpl
- All Implemented Interfaces:
Dialogs
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
class
class
class
Nested 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
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected BackgroundWorker
protected UiComponentProperties
protected HtmlSanitizer
protected IconResolver
protected Icons
protected Messages
protected ScreenBuilders
protected UiScreenProperties
protected AppUI
-
Constructor Summary
-
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.void
void
setScreenBuilders
(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:Dialogs
Creates 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:
createOptionDialog
in interfaceDialogs
- Returns:
- builder
-
createMessageDialog
Description copied from interface:Dialogs
Creates message dialog builder.
Example of showing a message dialog:dialogs.createMessageDialog() .withCaption("Alert") .withMessage("Report has been saved") .show();
- Specified by:
createMessageDialog
in interfaceDialogs
- Returns:
- builder
-
createExceptionDialog
Description copied from interface:Dialogs
Creates exception dialog builder.
Example of showing an exception dialog:dialogs.createExceptionDialog() .withCaption("Alert") .withMessage("Report has been saved") .withThrowable(exception) .show();
- Specified by:
createExceptionDialog
in interfaceDialogs
- Returns:
- builder
-
createInputDialog
Description copied from interface:Dialogs
Creates 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:
createInputDialog
in 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:Dialogs
Creates 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:
createBackgroundWorkDialog
in interfaceDialogs
- Parameters:
owner
- origin screen from the dialog is invoked- Returns:
- builder
-
createButton
-