Modifier and Type | Class and Description |
---|---|
class |
DialogsImpl.BackgroundWorkDialogBuilderImpl<T extends java.lang.Number,V> |
class |
DialogsImpl.ExceptionDialogBuilderImpl |
class |
DialogsImpl.InputDialogBuilderImpl |
class |
DialogsImpl.MessageDialogBuilderImpl |
class |
DialogsImpl.OptionDialogBuilderImpl |
Dialogs.BackgroundWorkDialogBuilder<T extends java.lang.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
Modifier and Type | Field and Description |
---|---|
protected org.springframework.context.ApplicationContext |
applicationContext |
protected BackgroundWorker |
backgroundWorker |
protected UiComponentProperties |
componentProperties |
protected HtmlSanitizer |
htmlSanitizer |
protected IconResolver |
iconResolver |
protected Icons |
icons |
protected io.jmix.core.Messages |
messages |
protected ScreenBuilders |
screenBuilders |
protected UiScreenProperties |
screenProperties |
protected AppUI |
ui |
Constructor and Description |
---|
DialogsImpl() |
Modifier and Type | Method and Description |
---|---|
Dialogs.BackgroundWorkDialogBuilder |
createBackgroundWorkDialog(FrameOwner owner,
BackgroundTask backgroundTask)
Creates background work dialog builder.
|
JmixButton |
createButton(Action action) |
Dialogs.ExceptionDialogBuilder |
createExceptionDialog()
Creates exception dialog builder.
|
Dialogs.InputDialogBuilder |
createInputDialog(FrameOwner owner)
Creates input dialog builder.
|
Dialogs.MessageDialogBuilder |
createMessageDialog()
Creates message dialog builder.
|
Dialogs.OptionDialogBuilder |
createOptionDialog()
Creates option dialog builder.
|
void |
setAppUi(AppUI ui) |
void |
setScreenBuilders(ScreenBuilders screenBuilders) |
@Autowired protected io.jmix.core.Messages messages
@Autowired protected BackgroundWorker backgroundWorker
@Autowired protected IconResolver iconResolver
@Autowired protected Icons icons
@Autowired protected UiComponentProperties componentProperties
@Autowired protected UiScreenProperties screenProperties
@Autowired protected HtmlSanitizer htmlSanitizer
@Autowired protected org.springframework.context.ApplicationContext applicationContext
protected AppUI ui
protected ScreenBuilders screenBuilders
@Autowired public void setAppUi(AppUI ui)
@Autowired public void setScreenBuilders(ScreenBuilders screenBuilders)
public Dialogs.OptionDialogBuilder createOptionDialog()
Dialogs
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();
createOptionDialog
in interface Dialogs
public Dialogs.MessageDialogBuilder createMessageDialog()
Dialogs
dialogs.createMessageDialog()
.withCaption("Alert")
.withMessage("Report has been saved")
.show();
createMessageDialog
in interface Dialogs
public Dialogs.ExceptionDialogBuilder createExceptionDialog()
Dialogs
dialogs.createExceptionDialog()
.withCaption("Alert")
.withMessage("Report has been saved")
.withThrowable(exception)
.show();
createExceptionDialog
in interface Dialogs
public Dialogs.InputDialogBuilder createInputDialog(FrameOwner owner)
Dialogs
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();
createInputDialog
in interface Dialogs
owner
- origin screen from input dialog is invokedpublic Dialogs.BackgroundWorkDialogBuilder createBackgroundWorkDialog(FrameOwner owner, BackgroundTask backgroundTask)
Dialogs
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();
createBackgroundWorkDialog
in interface Dialogs
owner
- origin screen from the dialog is invokedpublic JmixButton createButton(Action action)