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
FieldsModifier and TypeFieldDescriptionprotected Action[]protected com.vaadin.flow.component.orderedlayout.HorizontalLayoutprotected com.vaadin.flow.component.dialog.Dialogprotected com.vaadin.flow.component.html.H3protected com.vaadin.flow.component.Component -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DialogActionfindFirstActionWithType(Action[] actions, EnumSet<DialogAction.Type> types) Action[]com.vaadin.flow.component.ComponentgetText()Gets the theme names for this component.getWidth()booleanbooleanvoidopen()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.HasHeaderSets a header text.- Specified by:
withHeaderin interfaceDialogs.HasHeader<Dialogs.OptionDialogBuilder>- Parameters:
header- header text- Returns:
- builder
-
getHeader
- Specified by:
getHeaderin interfaceDialogs.HasHeader<Dialogs.OptionDialogBuilder>- Returns:
- header text
-
withText
Description copied from interface:Dialogs.HasTextSets a text.- Specified by:
withTextin interfaceDialogs.HasText<Dialogs.OptionDialogBuilder>- Parameters:
text- a text- Returns:
- builder
-
getText
- Specified by:
getTextin interfaceDialogs.HasText<Dialogs.OptionDialogBuilder>- Returns:
- a text
-
withContent
Description copied from interface:Dialogs.HasContentSets a content.- Specified by:
withContentin interfaceDialogs.HasContent<Dialogs.OptionDialogBuilder>- Parameters:
content- a content- Returns:
- builder
-
getContent
@Nullable public com.vaadin.flow.component.Component getContent()- Specified by:
getContentin interfaceDialogs.HasContent<Dialogs.OptionDialogBuilder>- Returns:
- a content
-
withWidth
Description copied from interface:Dialogs.HasSizeSets dialog width.- Specified by:
withWidthin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Parameters:
width- width- Returns:
- builder
-
getWidth
- Specified by:
getWidthin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Returns:
- dialog width value
-
withHeight
Description copied from interface:Dialogs.HasSizeSets dialog height.- Specified by:
withHeightin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Parameters:
height- height- Returns:
- builder
-
getHeight
- Specified by:
getHeightin interfaceDialogs.HasSize<Dialogs.OptionDialogBuilder>- Returns:
- dialog height value
-
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.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.HasThemeGets the theme names for this component.- Specified by:
getThemeNamein interfaceDialogs.HasTheme<Dialogs.OptionDialogBuilder>- 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
-
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.OptionDialogBuilder>- Parameters:
draggable-trueto enable dragging of the dialog,falseotherwise- Returns:
- builder
-
isDraggable
public boolean isDraggable()- Specified by:
isDraggablein interfaceDialogs.Draggable<Dialogs.OptionDialogBuilder>- 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.OptionDialogBuilder>- Parameters:
resizable-trueto enabled resizing of the dialog,falseotherwise.- Returns:
- builder
-
isResizable
public boolean isResizable()- Specified by:
isResizablein interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Returns:
trueif resizing is enabled,falseotherwise
-
withMinWidth
Description copied from interface:Dialogs.ResizableSets a dialog min width.- Specified by:
withMinWidthin interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Parameters:
minWidth- a dialog min width- Returns:
- builder
-
getMinWidth
- Specified by:
getMinWidthin interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Returns:
- dialog min width value
-
withMinHeight
Description copied from interface:Dialogs.ResizableSets a dialog min height.- Specified by:
withMinHeightin interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Parameters:
minHeight- a dialog min height- Returns:
- builder
-
getMinHeight
- Specified by:
getMinHeightin interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Returns:
- dialog min height value
-
withMaxWidth
Description copied from interface:Dialogs.ResizableSets a dialog max width.- Specified by:
withMaxWidthin interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Parameters:
maxWidth- a dialog max width- Returns:
- builder
-
getMaxWidth
- Specified by:
getMaxWidthin interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Returns:
- dialog max width value
-
withMaxHeight
Description copied from interface:Dialogs.ResizableSets a dialog max height.- Specified by:
withMaxHeightin interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Parameters:
maxHeight- a dialog max height- Returns:
- builder
-
getMaxHeight
- Specified by:
getMaxHeightin interfaceDialogs.Resizable<Dialogs.OptionDialogBuilder>- Returns:
- dialog max height value
-
withActions
Description copied from interface:Dialogs.OptionDialogBuilderSets dialog actions.- Specified by:
withActionsin interfaceDialogs.OptionDialogBuilder- Parameters:
actions- dialog actions- Returns:
- builder
-
getActions
- Specified by:
getActionsin interfaceDialogs.OptionDialogBuilder- Returns:
- dialog actions
-
open
public void open()Description copied from interface:Dialogs.OptionDialogBuilderOpens the dialog.- Specified by:
openin interfaceDialogs.OptionDialogBuilder
-
findFirstActionWithType
@Nullable protected DialogAction findFirstActionWithType(Action[] actions, EnumSet<DialogAction.Type> types)
-