Package io.jmix.flowui.impl
Class DialogsImpl.OptionDialogBuilderImpl
java.lang.Object
io.jmix.flowui.impl.DialogsImpl.OptionDialogBuilderImpl
- All Implemented Interfaces:
Dialogs.DialogBuilder<Dialogs.OptionDialogBuilder>
,Dialogs.Draggable<Dialogs.OptionDialogBuilder>
,Dialogs.HasContent<Dialogs.OptionDialogBuilder>
,Dialogs.HasHeader<Dialogs.OptionDialogBuilder>
,Dialogs.HasSize<Dialogs.OptionDialogBuilder>
,Dialogs.HasText<Dialogs.OptionDialogBuilder>
,Dialogs.HasTheme<Dialogs.OptionDialogBuilder>
,Dialogs.OptionDialogBuilder
,Dialogs.Resizable<Dialogs.OptionDialogBuilder>
- Enclosing class:
- DialogsImpl
public class DialogsImpl.OptionDialogBuilderImpl
extends Object
implements Dialogs.OptionDialogBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprotected Action[]
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout
protected com.vaadin.flow.component.dialog.Dialog
protected com.vaadin.flow.component.html.H3
protected com.vaadin.flow.component.Component
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected DialogAction
findFirstActionWithType
(Action[] actions, EnumSet<DialogAction.Type> types) Action[]
com.vaadin.flow.component.Component
getText()
Gets the theme names for this component.getWidth()
boolean
boolean
void
open()
Opens the dialog.withActions
(Action... actions) Sets dialog actions.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.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 -
text
protected com.vaadin.flow.component.Component text -
buttonsContainer
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout buttonsContainer -
actions
-
-
Constructor Details
-
OptionDialogBuilderImpl
public OptionDialogBuilderImpl()
-
-
Method Details
-
withHeader
Description copied from interface:Dialogs.HasHeader
Sets a header text.- Specified by:
withHeader
in interfaceDialogs.HasHeader<Dialogs.OptionDialogBuilder>
- Parameters:
header
- header text- Returns:
- builder
-
getHeader
- Specified by:
getHeader
in interfaceDialogs.HasHeader<Dialogs.OptionDialogBuilder>
- Returns:
- header text
-
withText
Description copied from interface:Dialogs.HasText
Sets a text.- Specified by:
withText
in interfaceDialogs.HasText<Dialogs.OptionDialogBuilder>
- Parameters:
text
- a text- Returns:
- builder
-
getText
- Specified by:
getText
in interfaceDialogs.HasText<Dialogs.OptionDialogBuilder>
- Returns:
- a text
-
withContent
Description copied from interface:Dialogs.HasContent
Sets a content.- Specified by:
withContent
in interfaceDialogs.HasContent<Dialogs.OptionDialogBuilder>
- Parameters:
content
- a content- Returns:
- builder
-
getContent
@Nullable public com.vaadin.flow.component.Component getContent()- Specified by:
getContent
in interfaceDialogs.HasContent<Dialogs.OptionDialogBuilder>
- Returns:
- a content
-
withWidth
Description copied from interface:Dialogs.HasSize
Sets dialog width.- Specified by:
withWidth
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Parameters:
width
- width- Returns:
- builder
-
getWidth
- Specified by:
getWidth
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Returns:
- dialog width value
-
withHeight
Description copied from interface:Dialogs.HasSize
Sets dialog height.- Specified by:
withHeight
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Parameters:
height
- height- Returns:
- builder
-
getHeight
- Specified by:
getHeight
in interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>
- Returns:
- dialog height value
-
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.OptionDialogBuilder>
- 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.OptionDialogBuilder>
- 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
-
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.OptionDialogBuilder>
- Parameters:
draggable
-true
to enable dragging of the dialog,false
otherwise- Returns:
- builder
-
isDraggable
public boolean isDraggable()- Specified by:
isDraggable
in interfaceDialogs.Draggable<Dialogs.OptionDialogBuilder>
- 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.OptionDialogBuilder>
- Parameters:
resizable
-true
to enabled resizing of the dialog,false
otherwise.- Returns:
- builder
-
isResizable
public boolean isResizable()- Specified by:
isResizable
in interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>
- 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.OptionDialogBuilder>
- Parameters:
minWidth
- a dialog min width- Returns:
- builder
-
getMinWidth
- Specified by:
getMinWidth
in interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>
- Returns:
- dialog min width value
-
withMinHeight
Description copied from interface:Dialogs.Resizable
Sets a dialog min height.- Specified by:
withMinHeight
in interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>
- Parameters:
minHeight
- a dialog min height- Returns:
- builder
-
getMinHeight
- Specified by:
getMinHeight
in interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>
- Returns:
- dialog min height value
-
withMaxWidth
Description copied from interface:Dialogs.Resizable
Sets a dialog max width.- Specified by:
withMaxWidth
in interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>
- Parameters:
maxWidth
- a dialog max width- Returns:
- builder
-
getMaxWidth
- Specified by:
getMaxWidth
in interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>
- Returns:
- dialog max width value
-
withMaxHeight
Description copied from interface:Dialogs.Resizable
Sets a dialog max height.- Specified by:
withMaxHeight
in interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>
- Parameters:
maxHeight
- a dialog max height- Returns:
- builder
-
getMaxHeight
- Specified by:
getMaxHeight
in interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>
- Returns:
- dialog max height value
-
withActions
Description copied from interface:Dialogs.OptionDialogBuilder
Sets dialog actions.- Specified by:
withActions
in interfaceDialogs.OptionDialogBuilder
- Parameters:
actions
- dialog actions- Returns:
- builder
-
getActions
- Specified by:
getActions
in interfaceDialogs.OptionDialogBuilder
- Returns:
- dialog actions
-
open
public void open()Description copied from interface:Dialogs.OptionDialogBuilder
Opens the dialog.- Specified by:
open
in interfaceDialogs.OptionDialogBuilder
-
findFirstActionWithType
@Nullable protected DialogAction findFirstActionWithType(Action[] actions, EnumSet<DialogAction.Type> types)
-