Class JmixSideDialog
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasStyle,Serializable
- Direct Known Subclasses:
SideDialog
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classclassRepresents the footer section of the side dialog.classRepresents the header section of the side dialog. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JmixSideDialog.DrawerFooterprotected JmixSideDialog.DrawerHeader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Collection<com.vaadin.flow.component.Component> components) voidaddComponentAtIndex(int index, com.vaadin.flow.component.Component component) voidclose()Closes the dialog.com.vaadin.flow.dom.ClassListList<com.vaadin.flow.component.Component>Returns the max-width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).Returns the min-width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).Returns the width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).com.vaadin.flow.dom.StylegetStyle()Returns the max-height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).Returns the min-height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).Returns the height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).booleanbooleanbooleanbooleanisModal()booleanisOpened()voidopen()Opens the dialog.voidsetClassName(String className) voidsetCloseOnEsc(boolean closeOnEsc) Sets whether this dialog can be closed by hitting the ESC key or not.voidsetCloseOnOutsideClick(boolean closeOnOutsideClick) Sets whether this dialog can be closed by clicking outside it or not.voidsetFullscreenOnSmallDevices(boolean fullscreenOnSmallDevice) Sets whether the dialog should be displayed in fullscreen mode on small devices.voidsetHeaderTitle(String title) Sets the title to be rendered on the dialog header.voidsetHorizontalMaxSize(String maxSize) Sets the max-width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).voidsetHorizontalMinSize(String minSize) Sets the min-width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).voidsetHorizontalSize(String size) Sets the width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).voidsetModal(boolean modal) Sets whether a component will open a modal or modeless dialog.voidsetOverlayRole(String role) Sets the ARIA role for the overlay element, used by screen readers.voidsetSideDialogPosition(SideDialogPosition position) Sets the side dialog position.voidsetVerticalMaxSize(String maxSize) Sets the max-height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).voidsetVerticalMinSize(String minSize) Sets the min-height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).voidsetVerticalSize(String size) Sets the height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).voidsetVisible(boolean visible) Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement, initContentMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, addComponentAsFirst, remove, remove, removeAllMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, hasClassName, removeClassName, removeClassNames, setClassName
-
Field Details
-
header
-
-
Constructor Details
-
JmixSideDialog
public JmixSideDialog()
-
-
Method Details
-
add
- Specified by:
addin interfacecom.vaadin.flow.component.HasComponents
-
addComponentAtIndex
public void addComponentAtIndex(int index, com.vaadin.flow.component.Component component) - Specified by:
addComponentAtIndexin interfacecom.vaadin.flow.component.HasComponents
-
getContentComponents
- Returns:
- the content of the dialog
-
getHorizontalSize
Returns the width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).Note that this does not return the actual size of the dialog but the width which has been set using
setHorizontalSize(String).- Returns:
- the width of the dialog or
nullif the width is not set
-
setHorizontalSize
Sets the width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).The width should be in a format understood by the browser, e.g. "100px" or "2.5em".
The default width is taken from the theme variable
--jmix-side-dialog-horizontal-size. If it is not set, the default value isauto.- Parameters:
size- the width of the dialog ornullto remove the inline width from the style
-
getHorizontalMaxSize
Returns the max-width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).Note that this does not return the actual size of the dialog but the max-width which has been set using
setHorizontalMaxSize(String).- Returns:
- the max-width of the dialog or
nullif the width is not set
-
setHorizontalMaxSize
Sets the max-width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).The width should be in a format understood by the browser, e.g. "100px" or "2.5em".
The default max-width is taken from the theme variable
--jmix-side-dialog-horizontal-max-size. If it is not set, the default value is50%.- Parameters:
maxSize- the max-width of the dialog ornullto remove the inline max-width property from the style
-
getHorizontalMinSize
Returns the min-width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).Note that this does not return the actual size of the dialog but the min-width which has been set using
setHorizontalMinSize(String).- Returns:
- the min-width of the dialog or
nullif the min-width is not set
-
setHorizontalMinSize
Sets the min-width of the dialog when horizontal position is configured (SideDialogPosition.LEFT,SideDialogPosition.RIGHT,SideDialogPosition.INLINE_STARTorSideDialogPosition.INLINE_END).The min-width should be in a format understood by the browser, e.g. "100px" or "2.5em".
The default min-width is taken from the theme variable
--jmix-side-dialog-horizontal-min-size. If it is not set, the default value is16em.- Parameters:
minSize- the min-width of the dialog ornullto remove the inline min-width property from the style
-
getVerticalSize
Returns the height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).Note that this does not return the actual size of the dialog but the height which has been set using
setVerticalSize(String).- Returns:
- the height of the dialog or
nullif the height is not set
-
setVerticalSize
Sets the height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).The height should be in a format understood by the browser, e.g. "100px" or "2.5em".
The default height is taken from the theme variable
--jmix-side-dialog-vertical-size. If it is not set, the default value isauto.- Parameters:
size- the height of the dialog ornullto remove the inline height property from the style
-
getVerticalMaxSize
Returns the max-height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).Note that this does not return the actual size of the side panel but the max-height which has been set using
setVerticalMaxSize(String).- Returns:
- the max-height of the dialog or
nullif the max-height is not set
-
setVerticalMaxSize
Sets the max-height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).The max-height should be in a format understood by the browser, e.g. "100px" or "2.5em".
The default max-height is taken from the theme variable
--jmix-side-dialog-vertical-max-size. If it is not set, the default value is50vh.- Parameters:
maxSize- the max-height of the dialog ornullto remove the inline max-height property from style
-
getVerticalMinSize
Returns the min-height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).Note that this does not return the actual size of the side panel but the min-height which has been set using
setVerticalMinSize(String).- Returns:
- the min-height of the dialog or
nullif the min-height is not set
-
setVerticalMinSize
Sets the min-height of the dialog when vertical position is configured (SideDialogPosition.TOP,SideDialogPosition.BOTTOM).The min-height should be in a format understood by the browser, e.g. "100px" or "2.5em".
The default min-height is taken from the theme variable
--jmix-side-dialog-vertical-min-size. If it is not set, the default value is16em.- Parameters:
minSize- the min-height of the dialog ornullto remove the inline min-height property from style
-
setClassName
- Specified by:
setClassNamein interfacecom.vaadin.flow.component.HasStyle
-
getClassNames
public com.vaadin.flow.dom.ClassList getClassNames()- Specified by:
getClassNamesin interfacecom.vaadin.flow.component.HasStyle
-
getStyle
public com.vaadin.flow.dom.Style getStyle()- Specified by:
getStylein interfacecom.vaadin.flow.component.HasStyle
-
isFullscreenOnSmallDevices
public boolean isFullscreenOnSmallDevices()- Returns:
trueif the dialog should be displayed in fullscreen mode on small devices
-
setFullscreenOnSmallDevices
public void setFullscreenOnSmallDevices(boolean fullscreenOnSmallDevice) Sets whether the dialog should be displayed in fullscreen mode on small devices.The default value is
true.- Parameters:
fullscreenOnSmallDevice- fullscreen option
-
getSideDialogPosition
- Returns:
- the side dialog position
-
setSideDialogPosition
Sets the side dialog position.The default value is
SideDialogPosition.RIGHT.- Parameters:
position- the side dialog position
-
isOpened
public boolean isOpened()- Returns:
trueif the dialog is opened,falseotherwise
-
open
public void open()Opens the dialog. -
close
public void close()Closes the dialog. -
isModal
public boolean isModal()- Returns:
trueif the dialog is a modal dialog,falseotherwise
-
setModal
public void setModal(boolean modal) Sets whether a component will open a modal or modeless dialog.- Parameters:
modal- modal option
-
isCloseOnEsc
public boolean isCloseOnEsc()- Returns:
trueif the dialog should be closed when hitting the ESC key
-
setCloseOnEsc
public void setCloseOnEsc(boolean closeOnEsc) Sets whether this dialog can be closed by hitting the ESC key or not.The default value is
true.- Parameters:
closeOnEsc- closeOnEsc option
-
isCloseOnOutsideClick
public boolean isCloseOnOutsideClick()- Returns:
trueif the dialog should be closed when clicking outside it
-
setCloseOnOutsideClick
public void setCloseOnOutsideClick(boolean closeOnOutsideClick) Sets whether this dialog can be closed by clicking outside it or not.The default value is
true.- Parameters:
closeOnOutsideClick- closeOnOutsideClick option
-
getHeaderTitle
- Returns:
- the title to be rendered on the dialog header or empty string if not set
-
setHeaderTitle
Sets the title to be rendered on the dialog header.- Parameters:
title- the title to set ornullto remove the header title
-
getOverlayRole
- Returns:
- the ARIA role for the overlay element or
nullif not set
-
setOverlayRole
Sets the ARIA role for the overlay element, used by screen readers.- Parameters:
role- the ARIA role to set
-
setVisible
public void setVisible(boolean visible) - Overrides:
setVisiblein classcom.vaadin.flow.component.Component
-
getHeader
- Returns:
- the header of the dialog
-