Package io.jmix.ui.sys
Class DialogsImpl.OptionDialogBuilderImpl
java.lang.Object
io.jmix.ui.sys.DialogsImpl.OptionDialogBuilderImpl
- All Implemented Interfaces:
Dialogs.DialogBuilder<Dialogs.OptionDialogBuilder>,Dialogs.HasCaption<Dialogs.OptionDialogBuilder>,Dialogs.HasContentMode<Dialogs.OptionDialogBuilder>,Dialogs.HasHtmlSanitizer<Dialogs.OptionDialogBuilder>,Dialogs.HasMessage<Dialogs.OptionDialogBuilder>,Dialogs.HasSize<Dialogs.OptionDialogBuilder>,Dialogs.HasStyleName<Dialogs.OptionDialogBuilder>,Dialogs.HasWindowMode<Dialogs.OptionDialogBuilder>,Dialogs.OptionDialogBuilder
- Enclosing class:
- DialogsImpl
public class DialogsImpl.OptionDialogBuilderImpl
extends Object
implements Dialogs.OptionDialogBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Action[]protected com.vaadin.ui.HorizontalLayoutprotected booleanprotected com.vaadin.ui.VerticalLayoutprotected JmixLabelprotected JmixWindow -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DialogActionfindFirstActionWithType(Action[] actions, EnumSet<DialogAction.Type> types) Action[]floatfloatgetWidth()booleanvoidshow()Shows the dialog.withActions(Action... actions) Sets dialog actions.withCaption(String caption) Sets caption text.withContentMode(ContentMode contentMode) Sets content mode for message, e.g.withHeight(String height) Sets dialog height.withHtmlSanitizer(boolean htmlSanitizerEnabled) Sets whether html sanitizer is enabled or not for dialog content.withMessage(String message) Sets message text.withStyleName(String styleName) Sets custom CSS style name for dialog.Sets dialog width.withWindowMode(WindowMode windowMode) Sets the mode of the dialog window.
-
Field Details
-
window
-
messageLabel
-
layout
protected com.vaadin.ui.VerticalLayout layout -
buttonsContainer
protected com.vaadin.ui.HorizontalLayout buttonsContainer -
htmlSanitizerEnabled
protected boolean htmlSanitizerEnabled -
actions
-
-
Constructor Details
-
OptionDialogBuilderImpl
public OptionDialogBuilderImpl()
-
-
Method Details
-
withCaption
Description copied from interface:Dialogs.HasCaptionSets caption text.- Specified by:
withCaptionin interfaceDialogs.HasCaption<Dialogs.OptionDialogBuilder>- Parameters:
caption- caption text- Returns:
- builder
-
getCaption
- Specified by:
getCaptionin interfaceDialogs.HasCaption<Dialogs.OptionDialogBuilder>- Returns:
- caption text
-
withMessage
Description copied from interface:Dialogs.HasMessageSets message text.- Specified by:
withMessagein interfaceDialogs.HasMessage<Dialogs.OptionDialogBuilder>- Parameters:
message- message text- Returns:
- builder
-
getMessage
- Specified by:
getMessagein interfaceDialogs.HasMessage<Dialogs.OptionDialogBuilder>- Returns:
- message text
-
withContentMode
Description copied from interface:Dialogs.HasContentMode- Specified by:
withContentModein interfaceDialogs.HasContentMode<Dialogs.OptionDialogBuilder>- Parameters:
contentMode- content mode- Returns:
- builder
-
getContentMode
- Specified by:
getContentModein interfaceDialogs.HasContentMode<Dialogs.OptionDialogBuilder>- Returns:
- message content mode
-
withActions
Description copied from interface:Dialogs.OptionDialogBuilderSets dialog actions.- Specified by:
withActionsin interfaceDialogs.OptionDialogBuilder- Parameters:
actions- actions- Returns:
- builder
-
getActions
- Specified by:
getActionsin interfaceDialogs.OptionDialogBuilder- Returns:
- dialog actions
-
withWidth
Description copied from interface:Dialogs.HasSizeSets dialog width.- Specified by:
withWidthin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Parameters:
width- width- Returns:
- builder
-
getWidth
public float getWidth()- Specified by:
getWidthin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Returns:
- dialog width value
-
getWidthSizeUnit
- Specified by:
getWidthSizeUnitin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Returns:
- dialog width unit
-
withHeight
Description copied from interface:Dialogs.HasSizeSets dialog height.- Specified by:
withHeightin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Parameters:
height- height- Returns:
- builder
-
getHeight
public float getHeight()- Specified by:
getHeightin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Returns:
- dialog height value
-
getHeightSizeUnit
- Specified by:
getHeightSizeUnitin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Returns:
- dialog height unit
-
withWindowMode
Description copied from interface:Dialogs.HasWindowModeSets the mode of the dialog window.- Specified by:
withWindowModein interfaceDialogs.HasWindowMode<Dialogs.OptionDialogBuilder>- Parameters:
windowMode- the mode of the dialog window- Returns:
- builder
-
getWindowMode
- Specified by:
getWindowModein interfaceDialogs.HasWindowMode<Dialogs.OptionDialogBuilder>- Returns:
- the mode of the dialog window
-
withStyleName
Description copied from interface:Dialogs.HasStyleNameSets custom CSS style name for dialog.- Specified by:
withStyleNamein interfaceDialogs.HasStyleName<Dialogs.OptionDialogBuilder>- Parameters:
styleName- style name- Returns:
- builder
-
getStyleName
- Specified by:
getStyleNamein interfaceDialogs.HasStyleName<Dialogs.OptionDialogBuilder>- Returns:
- custom style name
-
withHtmlSanitizer
Description copied from interface:Dialogs.HasHtmlSanitizerSets whether html sanitizer is enabled or not for dialog content.- Specified by:
withHtmlSanitizerin interfaceDialogs.HasHtmlSanitizer<Dialogs.OptionDialogBuilder>- Parameters:
htmlSanitizerEnabled- specifies whether html sanitizer is enabled- Returns:
- builder
-
isHtmlSanitizerEnabled
public boolean isHtmlSanitizerEnabled()- Specified by:
isHtmlSanitizerEnabledin interfaceDialogs.HasHtmlSanitizer<Dialogs.OptionDialogBuilder>- Returns:
- html sanitizer is enabled for dialog content
-
show
public void show()Description copied from interface:Dialogs.OptionDialogBuilderShows the dialog.- Specified by:
showin interfaceDialogs.OptionDialogBuilder
-
findFirstActionWithType
@Nullable protected DialogAction findFirstActionWithType(Action[] actions, EnumSet<DialogAction.Type> types)
-