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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentgetText()Gets the theme names for this component.getWidth()booleanbooleanbooleanbooleanisModal()booleanvoidopen()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.HasHeaderSets a header text.- Specified by:
withHeaderin interfaceDialogs.HasHeader<Dialogs.MessageDialogBuilder>- Parameters:
header- header text- Returns:
- builder
-
getHeader
- Specified by:
getHeaderin interfaceDialogs.HasHeader<Dialogs.MessageDialogBuilder>- Returns:
- header text
-
withWidth
Description copied from interface:Dialogs.HasSizeSets dialog width.- Specified by:
withWidthin interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>- Parameters:
width- width- Returns:
- builder
-
getWidth
- Specified by:
getWidthin interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>- Returns:
- dialog width value
-
withHeight
Description copied from interface:Dialogs.HasSizeSets dialog height.- Specified by:
withHeightin interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>- Parameters:
height- height- Returns:
- builder
-
getHeight
- Specified by:
getHeightin interfaceDialogs.HasSize<Dialogs.MessageDialogBuilder>- Returns:
- dialog height value
-
withText
Description copied from interface:Dialogs.HasTextSets a text.- Specified by:
withTextin interfaceDialogs.HasText<Dialogs.MessageDialogBuilder>- Parameters:
text- a text- Returns:
- builder
-
getText
- Specified by:
getTextin interfaceDialogs.HasText<Dialogs.MessageDialogBuilder>- Returns:
- a text
-
withContent
Description copied from interface:Dialogs.HasContentSets a content.- Specified by:
withContentin interfaceDialogs.HasContent<Dialogs.MessageDialogBuilder>- Parameters:
content- a content- Returns:
- builder
-
getContent
@Nullable public com.vaadin.flow.component.Component getContent()- Specified by:
getContentin interfaceDialogs.HasContent<Dialogs.MessageDialogBuilder>- Returns:
- a content
-
withThemeName
Description copied from interface:Dialogs.HasThemeSets the theme names of the dialog. This method overwrites any previous set theme names.- Specified by:
withThemeNamein 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.HasThemeGets the theme names for this component.- Specified by:
getThemeNamein interfaceDialogs.HasTheme<Dialogs.MessageDialogBuilder>- Returns:
- a space-separated string of theme names, empty string if there are no theme names
or
nullif attribute (theme) is not set at all
-
withCloseOnOutsideClick
Description copied from interface:Dialogs.CloseableSets whether this dialog can be closed by clicking outside.By default, the dialog is closable with an outside click.
- Specified by:
withCloseOnOutsideClickin interfaceDialogs.Closeable<Dialogs.MessageDialogBuilder>- Parameters:
closeOnOutsideClick-trueto enable closing this dialog with an outside click,falseto disable it- Returns:
- builder
-
isCloseOnOutsideClick
public boolean isCloseOnOutsideClick()- Specified by:
isCloseOnOutsideClickin interfaceDialogs.Closeable<Dialogs.MessageDialogBuilder>- Returns:
trueif this dialog can be closed by an outside click,falseotherwise
-
withCloseOnEsc
Description copied from interface:Dialogs.CloseableSets whether this dialog can be closed by hitting the esc-key or not.By default, the dialog is closable with esc.
- Specified by:
withCloseOnEscin interfaceDialogs.Closeable<Dialogs.MessageDialogBuilder>- Parameters:
closeOnEsc-trueto enable closing this dialog with the esc-key,falseto disable it- Returns:
- builder
-
isCloseOnEsc
public boolean isCloseOnEsc()- Specified by:
isCloseOnEscin interfaceDialogs.Closeable<Dialogs.MessageDialogBuilder>- Returns:
trueif this dialog can be closed with the esc-key,falseotherwise
-
withModal
Description copied from interface:Dialogs.HasModalSets whether component will open modal or modeless dialog.- Specified by:
withModalin interfaceDialogs.HasModal<Dialogs.MessageDialogBuilder>- Parameters:
modal-falseto enable dialog to open as modeless modal,trueotherwise.- Returns:
- builder
-
isModal
public boolean isModal()- Specified by:
isModalin interfaceDialogs.HasModal<Dialogs.MessageDialogBuilder>- Returns:
trueif modal dialog,falseotherwise.
-
withDraggable
Description copied from interface:Dialogs.DraggableSets whether dialog is enabled to be dragged by the user or not.- Specified by:
withDraggablein interfaceDialogs.Draggable<Dialogs.MessageDialogBuilder>- Parameters:
draggable-trueto enable dragging of the dialog,falseotherwise- Returns:
- builder
-
isDraggable
public boolean isDraggable()- Specified by:
isDraggablein interfaceDialogs.Draggable<Dialogs.MessageDialogBuilder>- Returns:
trueif dragging is enabled,falseotherwise
-
withResizable
Description copied from interface:Dialogs.ResizableSets whether dialog can be resized by user or not.By default, the dialog is not resizable.
- Specified by:
withResizablein interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Parameters:
resizable-trueto enabled resizing of the dialog,falseotherwise.- Returns:
- builder
-
isResizable
public boolean isResizable()- Specified by:
isResizablein interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Returns:
trueif resizing is enabled,falseotherwise
-
withMinWidth
Description copied from interface:Dialogs.ResizableSets a dialog min width.- Specified by:
withMinWidthin interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Parameters:
minWidth- a dialog min width- Returns:
- builder
-
getMinWidth
- Specified by:
getMinWidthin interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Returns:
- dialog min width value
-
withMinHeight
Description copied from interface:Dialogs.ResizableSets a dialog min height.- Specified by:
withMinHeightin interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Parameters:
minHeight- a dialog min height- Returns:
- builder
-
getMinHeight
- Specified by:
getMinHeightin interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Returns:
- dialog min height value
-
withMaxWidth
Description copied from interface:Dialogs.ResizableSets a dialog max width.- Specified by:
withMaxWidthin interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Parameters:
maxWidth- a dialog max width- Returns:
- builder
-
getMaxWidth
- Specified by:
getMaxWidthin interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Returns:
- dialog max width value
-
withMaxHeight
Description copied from interface:Dialogs.ResizableSets a dialog max height.- Specified by:
withMaxHeightin interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Parameters:
maxHeight- a dialog max height- Returns:
- builder
-
getMaxHeight
- Specified by:
getMaxHeightin interfaceDialogs.Resizable<Dialogs.MessageDialogBuilder>- Returns:
- dialog max height value
-
open
public void open()Description copied from interface:Dialogs.MessageDialogBuilderOpens the dialog.- Specified by:
openin interfaceDialogs.MessageDialogBuilder
-