Package io.jmix.flowui.impl
Class DialogsImpl.MessageDialogBuilderImpl
java.lang.Object
io.jmix.flowui.impl.DialogsImpl.MessageDialogBuilderImpl
- All Implemented Interfaces:
Dialogs.Closeable<Dialogs.MessageDialogBuilder>
,Dialogs.DialogBuilder<Dialogs.MessageDialogBuilder>
,Dialogs.Draggable<Dialogs.MessageDialogBuilder>
,Dialogs.HasContent<Dialogs.MessageDialogBuilder>
,Dialogs.HasHeader<Dialogs.MessageDialogBuilder>
,Dialogs.HasModal<Dialogs.MessageDialogBuilder>
,Dialogs.HasSize<Dialogs.MessageDialogBuilder>
,Dialogs.HasText<Dialogs.MessageDialogBuilder>
,Dialogs.HasTheme<Dialogs.MessageDialogBuilder>
,Dialogs.MessageDialogBuilder
,Dialogs.Resizable<Dialogs.MessageDialogBuilder>
- Enclosing class:
- DialogsImpl
public class DialogsImpl.MessageDialogBuilderImpl
extends Object
implements Dialogs.MessageDialogBuilder
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.Component
getText()
Gets the theme names for this component.getWidth()
boolean
boolean
boolean
boolean
isModal()
boolean
void
open()
Opens the dialog.withCloseOnEsc
(boolean closeOnEsc) Sets whether this dialog can be closed by hitting the esc-key or not.withCloseOnOutsideClick
(boolean closeOnOutsideClick) Sets whether this dialog can be closed by clicking outside.withContent
(com.vaadin.flow.component.Component content) Sets a content.withDraggable
(boolean draggable) Sets whether dialog is enabled to be dragged by the user or not.withHeader
(String header) Sets a header text.withHeight
(String height) Sets dialog height.withMaxHeight
(String maxHeight) Sets a dialog max height.withMaxWidth
(String maxWidth) Sets a dialog max width.withMinHeight
(String minHeight) Sets a dialog min height.withMinWidth
(String minWidth) Sets a dialog min width.withModal
(boolean modal) Sets whether component will open modal or modeless dialog.withResizable
(boolean resizable) Sets whether dialog can be resized by user or not.Sets a text.withThemeName
(String themeName) Sets the theme names of the dialog.Sets dialog width.
-
Field Details
-
dialog
protected com.vaadin.flow.component.dialog.Dialog dialog -
header
protected com.vaadin.flow.component.html.H3 header -
okButton
protected com.vaadin.flow.component.button.Button okButton -
text
protected com.vaadin.flow.component.Component text
-
-
Constructor Details
-
MessageDialogBuilderImpl
public MessageDialogBuilderImpl()
-
-
Method Details
-
withHeader
Description copied from interface:Dialogs.HasHeader
Sets a header text.- Specified by:
withHeader
in interfaceDialogs.HasHeader<Dialogs.MessageDialogBuilder>
- Parameters:
header
- header text- Returns:
- builder
-
getHeader
- Specified by:
getHeader
in interfaceDialogs.HasHeader<Dialogs.MessageDialogBuilder>
- Returns:
- header text
-
withWidth
Description copied from interface:Dialogs.HasSize
Sets dialog width.- Specified by:
withWidth
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Parameters:
width
- width- Returns:
- builder
-
getWidth
- Specified by:
getWidth
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Returns:
- dialog width value
-
withHeight
Description copied from interface:Dialogs.HasSize
Sets dialog height.- Specified by:
withHeight
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Parameters:
height
- height- Returns:
- builder
-
getHeight
- Specified by:
getHeight
in interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>
- Returns:
- dialog height value
-
withText
Description copied from interface:Dialogs.HasText
Sets a text.- Specified by:
withText
in interfaceDialogs.HasText<Dialogs.MessageDialogBuilder>
- Parameters:
text
- a text- Returns:
- builder
-
getText
- Specified by:
getText
in interfaceDialogs.HasText<Dialogs.MessageDialogBuilder>
- Returns:
- a text
-
withContent
Description copied from interface:Dialogs.HasContent
Sets a content.- Specified by:
withContent
in interfaceDialogs.HasContent<Dialogs.MessageDialogBuilder>
- Parameters:
content
- a content- Returns:
- builder
-
getContent
@Nullable public com.vaadin.flow.component.Component getContent()- Specified by:
getContent
in interfaceDialogs.HasContent<Dialogs.MessageDialogBuilder>
- Returns:
- a content
-
withThemeName
Description copied from interface:Dialogs.HasTheme
Sets the theme names of the dialog. This method overwrites any previous set theme names.- Specified by:
withThemeName
in interfaceDialogs.HasTheme<Dialogs.MessageDialogBuilder>
- Parameters:
themeName
- a space-separated string of theme names to set, or empty string to remove all theme names- Returns:
- builder
-
getThemeName
Description copied from interface:Dialogs.HasTheme
Gets the theme names for this component.- Specified by:
getThemeName
in interfaceDialogs.HasTheme<Dialogs.MessageDialogBuilder>
- Returns:
- a space-separated string of theme names, empty string if there are no theme names
or
null
if attribute (theme) is not set at all
-
withCloseOnOutsideClick
Description copied from interface:Dialogs.Closeable
Sets whether this dialog can be closed by clicking outside.By default, the dialog is closable with an outside click.
- Specified by:
withCloseOnOutsideClick
in interfaceDialogs.Closeable<Dialogs.MessageDialogBuilder>
- Parameters:
closeOnOutsideClick
-true
to enable closing this dialog with an outside click,false
to disable it- Returns:
- builder
-
isCloseOnOutsideClick
public boolean isCloseOnOutsideClick()- Specified by:
isCloseOnOutsideClick
in interfaceDialogs.Closeable<Dialogs.MessageDialogBuilder>
- Returns:
true
if this dialog can be closed by an outside click,false
otherwise
-
withCloseOnEsc
Description copied from interface:Dialogs.Closeable
Sets whether this dialog can be closed by hitting the esc-key or not.By default, the dialog is closable with esc.
- Specified by:
withCloseOnEsc
in interfaceDialogs.Closeable<Dialogs.MessageDialogBuilder>
- Parameters:
closeOnEsc
-true
to enable closing this dialog with the esc-key,false
to disable it- Returns:
- builder
-
isCloseOnEsc
public boolean isCloseOnEsc()- Specified by:
isCloseOnEsc
in interfaceDialogs.Closeable<Dialogs.MessageDialogBuilder>
- Returns:
true
if this dialog can be closed with the esc-key,false
otherwise
-
withModal
Description copied from interface:Dialogs.HasModal
Sets whether component will open modal or modeless dialog.- Specified by:
withModal
in interfaceDialogs.HasModal<Dialogs.MessageDialogBuilder>
- Parameters:
modal
-false
to enable dialog to open as modeless modal,true
otherwise.- Returns:
- builder
-
isModal
public boolean isModal()- Specified by:
isModal
in interfaceDialogs.HasModal<Dialogs.MessageDialogBuilder>
- Returns:
true
if modal dialog,false
otherwise.
-
withDraggable
Description copied from interface:Dialogs.Draggable
Sets whether dialog is enabled to be dragged by the user or not.- Specified by:
withDraggable
in interfaceDialogs.Draggable<Dialogs.MessageDialogBuilder>
- Parameters:
draggable
-true
to enable dragging of the dialog,false
otherwise- Returns:
- builder
-
isDraggable
public boolean isDraggable()- Specified by:
isDraggable
in interfaceDialogs.Draggable<Dialogs.MessageDialogBuilder>
- Returns:
true
if dragging is enabled,false
otherwise
-
withResizable
Description copied from interface:Dialogs.Resizable
Sets whether dialog can be resized by user or not.By default, the dialog is not resizable.
- Specified by:
withResizable
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Parameters:
resizable
-true
to enabled resizing of the dialog,false
otherwise.- Returns:
- builder
-
isResizable
public boolean isResizable()- Specified by:
isResizable
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Returns:
true
if resizing is enabled,false
otherwise
-
withMinWidth
Description copied from interface:Dialogs.Resizable
Sets a dialog min width.- Specified by:
withMinWidth
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Parameters:
minWidth
- a dialog min width- Returns:
- builder
-
getMinWidth
- Specified by:
getMinWidth
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Returns:
- dialog min width value
-
withMinHeight
Description copied from interface:Dialogs.Resizable
Sets a dialog min height.- Specified by:
withMinHeight
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Parameters:
minHeight
- a dialog min height- Returns:
- builder
-
getMinHeight
- Specified by:
getMinHeight
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Returns:
- dialog min height value
-
withMaxWidth
Description copied from interface:Dialogs.Resizable
Sets a dialog max width.- Specified by:
withMaxWidth
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Parameters:
maxWidth
- a dialog max width- Returns:
- builder
-
getMaxWidth
- Specified by:
getMaxWidth
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Returns:
- dialog max width value
-
withMaxHeight
Description copied from interface:Dialogs.Resizable
Sets a dialog max height.- Specified by:
withMaxHeight
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Parameters:
maxHeight
- a dialog max height- Returns:
- builder
-
getMaxHeight
- Specified by:
getMaxHeight
in interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>
- Returns:
- dialog max height value
-
open
public void open()Description copied from interface:Dialogs.MessageDialogBuilder
Opens the dialog.- Specified by:
open
in interfaceDialogs.MessageDialogBuilder
-