Package io.jmix.ui.sys
Class DialogsImpl.MessageDialogBuilderImpl
java.lang.Object
io.jmix.ui.sys.DialogsImpl.MessageDialogBuilderImpl
- All Implemented Interfaces:
Dialogs.DialogBuilder<Dialogs.MessageDialogBuilder>
,Dialogs.HasCaption<Dialogs.MessageDialogBuilder>
,Dialogs.HasContentMode<Dialogs.MessageDialogBuilder>
,Dialogs.HasHtmlSanitizer<Dialogs.MessageDialogBuilder>
,Dialogs.HasMessage<Dialogs.MessageDialogBuilder>
,Dialogs.HasModal<Dialogs.MessageDialogBuilder>
,Dialogs.HasSize<Dialogs.MessageDialogBuilder>
,Dialogs.HasStyleName<Dialogs.MessageDialogBuilder>
,Dialogs.HasWindowMode<Dialogs.MessageDialogBuilder>
,Dialogs.MessageDialogBuilder
- Enclosing class:
- DialogsImpl
public class DialogsImpl.MessageDialogBuilderImpl
extends Object
implements Dialogs.MessageDialogBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected com.vaadin.ui.VerticalLayout
protected JmixLabel
protected JmixButton
protected JmixWindow
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEnables closeOnClickOutside mode for window, so window can be closed by click outside of window content (by modality curtain).float
float
getWidth()
protected void
boolean
boolean
boolean
isModal()
modal()
Enables modal mode for dialog.void
show()
Shows the dialog.withCaption
(String caption) Sets caption text.withCloseOnClickOutside
(boolean closeOnClickOutside) Sets if window can be closed by click outside of window content (by modality curtain).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.withModal
(boolean modal) Sets dialog modality.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 -
okButton
-
htmlSanitizerEnabled
protected boolean htmlSanitizerEnabled
-
-
Constructor Details
-
MessageDialogBuilderImpl
public MessageDialogBuilderImpl()
-
-
Method Details
-
withCaption
Description copied from interface:Dialogs.HasCaption
Sets caption text.- Specified by:
withCaption
in interfaceDialogs.HasCaption<Dialogs.MessageDialogBuilder>
- Parameters:
caption
- caption text- Returns:
- builder
-
getCaption
- Specified by:
getCaption
in interfaceDialogs.HasCaption<Dialogs.MessageDialogBuilder>
- Returns:
- caption text
-
withMessage
Description copied from interface:Dialogs.HasMessage
Sets message text.- Specified by:
withMessage
in interfaceDialogs.HasMessage<Dialogs.MessageDialogBuilder>
- Parameters:
message
- message text- Returns:
- builder
-
getMessage
- Specified by:
getMessage
in interfaceDialogs.HasMessage<Dialogs.MessageDialogBuilder>
- Returns:
- message text
-
withContentMode
Description copied from interface:Dialogs.HasContentMode
- Specified by:
withContentMode
in interfaceDialogs.HasContentMode<Dialogs.MessageDialogBuilder>
- Parameters:
contentMode
- content mode- Returns:
- builder
-
getContentMode
- Specified by:
getContentMode
in interfaceDialogs.HasContentMode<Dialogs.MessageDialogBuilder>
- Returns:
- message content mode
-
withWidth
Description copied from interface:Dialogs.HasSize
Sets dialog width.- Specified by:
withWidth
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Parameters:
width
- width- Returns:
- builder
-
getWidth
public float getWidth()- Specified by:
getWidth
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Returns:
- dialog width value
-
getWidthSizeUnit
- Specified by:
getWidthSizeUnit
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Returns:
- dialog width unit
-
withHeight
Description copied from interface:Dialogs.HasSize
Sets dialog height.- Specified by:
withHeight
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Parameters:
height
- height- Returns:
- builder
-
getHeight
public float getHeight()- Specified by:
getHeight
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Returns:
- dialog height value
-
getHeightSizeUnit
- Specified by:
getHeightSizeUnit
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Returns:
- dialog height unit
-
isModal
public boolean isModal()- Specified by:
isModal
in interfaceDialogs.HasModal<Dialogs.MessageDialogBuilder>
- Returns:
- true if window is modal
-
withModal
Description copied from interface:Dialogs.HasModal
Sets dialog modality. When a modal window is open, components outside that window cannot be accessed.- Specified by:
withModal
in interfaceDialogs.HasModal<Dialogs.MessageDialogBuilder>
- Parameters:
modal
- modal flag- Returns:
- builder
-
modal
Description copied from interface:Dialogs.HasModal
Enables modal mode for dialog.- Specified by:
modal
in interfaceDialogs.HasModal<Dialogs.MessageDialogBuilder>
- Returns:
- builder
-
withWindowMode
Description copied from interface:Dialogs.HasWindowMode
Sets the mode of the dialog window.- Specified by:
withWindowMode
in interfaceDialogs.HasWindowMode<Dialogs.MessageDialogBuilder>
- Parameters:
windowMode
- the mode of the dialog window- Returns:
- builder
-
getWindowMode
- Specified by:
getWindowMode
in interfaceDialogs.HasWindowMode<Dialogs.MessageDialogBuilder>
- Returns:
- the mode of the dialog window
-
isCloseOnClickOutside
public boolean isCloseOnClickOutside()- Specified by:
isCloseOnClickOutside
in interfaceDialogs.MessageDialogBuilder
- Returns:
- true if window can be closed by click outside of window content (by modality curtain)
-
withCloseOnClickOutside
Description copied from interface:Dialogs.MessageDialogBuilder
Sets if window can be closed by click outside of window content (by modality curtain).- Specified by:
withCloseOnClickOutside
in interfaceDialogs.MessageDialogBuilder
- Parameters:
closeOnClickOutside
- true if window to be closed by click outside of window content (by modality curtain)- Returns:
- builder
-
closeOnClickOutside
Description copied from interface:Dialogs.MessageDialogBuilder
Enables closeOnClickOutside mode for window, so window can be closed by click outside of window content (by modality curtain).- Specified by:
closeOnClickOutside
in interfaceDialogs.MessageDialogBuilder
- Returns:
- builder
-
withStyleName
Description copied from interface:Dialogs.HasStyleName
Sets custom CSS style name for dialog.- Specified by:
withStyleName
in interfaceDialogs.HasStyleName<Dialogs.MessageDialogBuilder>
- Parameters:
styleName
- style name- Returns:
- builder
-
getStyleName
- Specified by:
getStyleName
in interfaceDialogs.HasStyleName<Dialogs.MessageDialogBuilder>
- 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.MessageDialogBuilder>
- Parameters:
htmlSanitizerEnabled
- specifies whether html sanitizer is enabled- Returns:
- builder
-
isHtmlSanitizerEnabled
public boolean isHtmlSanitizerEnabled()- Specified by:
isHtmlSanitizerEnabled
in interfaceDialogs.HasHtmlSanitizer<Dialogs.MessageDialogBuilder>
- Returns:
- html sanitizer is enabled for dialog content
-
show
public void show()Description copied from interface:Dialogs.MessageDialogBuilder
Shows the dialog.- Specified by:
show
in interfaceDialogs.MessageDialogBuilder
-
initShortcuts
protected void initShortcuts()
-