Package io.jmix.flowui
Interface Dialogs
- All Known Implementing Classes:
DialogsImpl
public interface Dialogs
Provides fluent interface for configuring and displaying dialogs.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDialogs.BackgroundTaskDialogBuilder<T extends Number,V> Builder of background task dialog.static interfaceRepresents Dialog Builders with close setting.static interfaceDialogs.DialogBuilder<T extends Dialogs.DialogBuilder>Base class for all Dialog Builders.static interfaceRepresents Dialog Builders that can be dragged.static interfaceRepresents Dialog Builders that have a text insideParagraphcomponent.static interfaceRepresents Dialog Builders that have a header.static interfaceRepresents Dialog Builders that have modal setting.static interfaceRepresents Dialog Builders that have size setting.static interfaceRepresents Dialog Builders that have style setting.static interfaceRepresents Dialog Builders that have a text insideParagraphcomponent as a content.static interfaceRepresents Dialog Builders that have theme setting.static interfacestatic interfacestatic interfacestatic interfaceRepresents Dialog Builders that can be resized. -
Method Summary
Modifier and TypeMethodDescription<T extends Number,V>
Dialogs.BackgroundTaskDialogBuilder<T,V> createBackgroundTaskDialog(BackgroundTask<T, V> backgroundTask) Creates background task dialog builder.createInputDialog(View<?> origin) Creates input dialog builder.Creates message dialog builder.Creates option dialog builder.
-
Method Details
-
createOptionDialog
Dialogs.OptionDialogBuilder createOptionDialog()Creates option dialog builder.
Example of showing an option dialog:dialogs.createOptionDialog() .withHeader("Confirm") .withText("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 }) ) .open(); -
createMessageDialog
Dialogs.MessageDialogBuilder createMessageDialog()Creates message dialog builder.
Example of showing a message dialog:dialogs.createMessageDialog() .withHeader("Attention") .withText("Report has been saved") .open();- Returns:
- builder
-
createInputDialog
Creates input dialog builder.
Example of showing an input dialog:dialogs.createInputDialog(this) .withParameters( stringParameter("name").withLabel("Name"), intParameter("count").withLabel("Count")) .withActions(DialogActions.OK_CANCEL) .withCloseListener(closeEvent -> notifications.create("Dialog is closed") .show() ) .withHeader("Goods") .open();- Parameters:
origin- origin view from input dialog is invoked- Returns:
- builder
-
createBackgroundTaskDialog
<T extends Number,V> Dialogs.BackgroundTaskDialogBuilder<T,V> createBackgroundTaskDialog(BackgroundTask<T, V> backgroundTask) Creates background task dialog builder.
Example of showing a background task dialog:dialogs.createBackgroundTaskDialog(backgroundTask) .withHeader("Task") .withText("My Task is Running") .withTotal(10) .withShowProgressInPercentage(true) .withCancelAllowed(true) .open();- Parameters:
backgroundTask- background task to run- Returns:
- builder
-