Search in sources :

Example 1 with OptionDialogBuilder

use of com.haulmont.cuba.gui.Dialogs.OptionDialogBuilder in project cuba by cuba-platform.

the class WebScreens method showOptionDialog.

@Override
public void showOptionDialog(String title, String message, Frame.MessageType messageType, Action[] actions) {
    OptionDialogBuilder builder = ui.getDialogs().createOptionDialog().withCaption(title).withMessage(message).withType(convertMessageType(messageType.getMessageMode())).withContentMode(Frame.MessageMode.isHTML(messageType.getMessageMode()) ? ContentMode.HTML : ContentMode.TEXT).withActions(actions);
    if (messageType.getWidth() != null) {
        SizeUnit sizeUnit = messageType.getWidthUnit() != null ? messageType.getWidthUnit() : SizeUnit.PIXELS;
        builder.withWidth(messageType.getWidth() + sizeUnit.getSymbol());
    }
    if (messageType.getMaximized() != null) {
        builder.withMaximized(messageType.getMaximized());
    }
    builder.show();
}
Also used : OptionDialogBuilder(com.haulmont.cuba.gui.Dialogs.OptionDialogBuilder)

Aggregations

OptionDialogBuilder (com.haulmont.cuba.gui.Dialogs.OptionDialogBuilder)1