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
Modifier and TypeFieldDescriptionprotected Action[]
protected com.vaadin.ui.HorizontalLayout
protected boolean
protected com.vaadin.ui.VerticalLayout
protected JmixLabel
protected JmixWindow
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected DialogAction
findFirstActionWithType
(Action[] actions, EnumSet<DialogAction.Type> types) Action[]
float
float
getWidth()
boolean
void
show()
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.HasCaption
Sets caption text.- Specified by:
withCaption
in interfaceDialogs.HasCaption<Dialogs.OptionDialogBuilder>
- Parameters:
caption
- caption text- Returns:
- builder
-
getCaption
- Specified by:
getCaption
in interfaceDialogs.HasCaption<Dialogs.OptionDialogBuilder>
- Returns:
- caption text
-
withMessage
Description copied from interface:Dialogs.HasMessage
Sets message text.- Specified by:
withMessage
in interfaceDialogs.HasMessage<Dialogs.OptionDialogBuilder>
- Parameters:
message
- message text- Returns:
- builder
-
getMessage
- Specified by:
getMessage
in interfaceDialogs.HasMessage<Dialogs.OptionDialogBuilder>
- Returns:
- message text
-
withContentMode
Description copied from interface:Dialogs.HasContentMode
- Specified by:
withContentMode
in interfaceDialogs.HasContentMode<Dialogs.OptionDialogBuilder>
- Parameters:
contentMode
- content mode- Returns:
- builder
-
getContentMode
- Specified by:
getContentMode
in interfaceDialogs.HasContentMode<Dialogs.OptionDialogBuilder>
- Returns:
- message content mode
-
withActions
Description copied from interface:Dialogs.OptionDialogBuilder
Sets dialog actions.- Specified by:
withActions
in interfaceDialogs.OptionDialogBuilder
- Parameters:
actions
- actions- Returns:
- builder
-
getActions
- Specified by:
getActions
in interfaceDialogs.OptionDialogBuilder
- Returns:
- dialog actions
-
withWidth
Description copied from interface:Dialogs.HasSize
Sets dialog width.- Specified by:
withWidth
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Parameters:
width
- width- Returns:
- builder
-
getWidth
public float getWidth()- Specified by:
getWidth
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Returns:
- dialog width value
-
getWidthSizeUnit
- Specified by:
getWidthSizeUnit
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Returns:
- dialog width unit
-
withHeight
Description copied from interface:Dialogs.HasSize
Sets dialog height.- Specified by:
withHeight
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Parameters:
height
- height- Returns:
- builder
-
getHeight
public float getHeight()- Specified by:
getHeight
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Returns:
- dialog height value
-
getHeightSizeUnit
- Specified by:
getHeightSizeUnit
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Returns:
- dialog height unit
-
withWindowMode
Description copied from interface:Dialogs.HasWindowMode
Sets the mode of the dialog window.- Specified by:
withWindowMode
in interfaceDialogs.HasWindowMode<Dialogs.OptionDialogBuilder>
- Parameters:
windowMode
- the mode of the dialog window- Returns:
- builder
-
getWindowMode
- Specified by:
getWindowMode
in interfaceDialogs.HasWindowMode<Dialogs.OptionDialogBuilder>
- Returns:
- the mode of the dialog window
-
withStyleName
Description copied from interface:Dialogs.HasStyleName
Sets custom CSS style name for dialog.- Specified by:
withStyleName
in interfaceDialogs.HasStyleName<Dialogs.OptionDialogBuilder>
- Parameters:
styleName
- style name- Returns:
- builder
-
getStyleName
- Specified by:
getStyleName
in interfaceDialogs.HasStyleName<Dialogs.OptionDialogBuilder>
- Returns:
- custom style name
-
withHtmlSanitizer
Description copied from interface:Dialogs.HasHtmlSanitizer
Sets whether html sanitizer is enabled or not for dialog content.- Specified by:
withHtmlSanitizer
in interfaceDialogs.HasHtmlSanitizer<Dialogs.OptionDialogBuilder>
- Parameters:
htmlSanitizerEnabled
- specifies whether html sanitizer is enabled- Returns:
- builder
-
isHtmlSanitizerEnabled
public boolean isHtmlSanitizerEnabled()- Specified by:
isHtmlSanitizerEnabled
in interfaceDialogs.HasHtmlSanitizer<Dialogs.OptionDialogBuilder>
- Returns:
- html sanitizer is enabled for dialog content
-
show
public void show()Description copied from interface:Dialogs.OptionDialogBuilder
Shows the dialog.- Specified by:
show
in interfaceDialogs.OptionDialogBuilder
-
findFirstActionWithType
@Nullable protected DialogAction findFirstActionWithType(Action[] actions, EnumSet<DialogAction.Type> types)
-