Class SideDialog
- 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,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
The side dialog manages the opening and closing of the dialog and its content, featuring a pop-out animation.
It can be configured to appear relative to the application window (see SideDialogPosition).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.kit.component.sidedialog.JmixSideDialog
JmixSideDialog.AbstractDrawerHeaderFooter, JmixSideDialog.DrawerFooter, JmixSideDialog.DrawerHeader -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextFields inherited from class io.jmix.flowui.kit.component.sidedialog.JmixSideDialog
footer, header -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddDialogCloseActionListener(com.vaadin.flow.component.ComponentEventListener<SideDialogCloseActionEvent> listener) Add a listener that controls whether the dialog should be closed or not.com.vaadin.flow.shared.RegistrationaddOpenedChangeListener(com.vaadin.flow.component.ComponentEventListener<SideDialogOpenedChangeEvent> listener) Adds a listener for opened change events.voidprotected voidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class io.jmix.flowui.kit.component.sidedialog.JmixSideDialog
add, addComponentAtIndex, close, getClassNames, getContentComponents, getFooter, getHeader, getHeaderTitle, getHorizontalMaxSize, getHorizontalMinSize, getHorizontalSize, getOverlayRole, getSideDialogPosition, getStyle, getVerticalMaxSize, getVerticalMinSize, getVerticalSize, isCloseOnEsc, isCloseOnOutsideClick, isFullscreenOnSmallDevices, isModal, isOpened, open, setClassName, setCloseOnEsc, setCloseOnOutsideClick, setFullscreenOnSmallDevices, setHeaderTitle, setHorizontalMaxSize, setHorizontalMinSize, setHorizontalSize, setModal, setOverlayRole, setSideDialogPosition, setVerticalMaxSize, setVerticalMinSize, setVerticalSize, setVisibleMethods 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
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
SideDialog
public SideDialog()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
initComponent
protected void initComponent() -
addOpenedChangeListener
public com.vaadin.flow.shared.Registration addOpenedChangeListener(com.vaadin.flow.component.ComponentEventListener<SideDialogOpenedChangeEvent> listener) Adds a listener for opened change events.- Parameters:
listener- listener to add- Returns:
- a registration for removing the listener
-
addDialogCloseActionListener
public com.vaadin.flow.shared.Registration addDialogCloseActionListener(com.vaadin.flow.component.ComponentEventListener<SideDialogCloseActionEvent> listener) Add a listener that controls whether the dialog should be closed or not.The listener is informed when the user wants to close the dialog by clicking outside the dialog or by pressing escape. Then you can decide whether to close or to keep opened the dialog. It means that dialog won't be closed automatically unless you call
JmixSideDialog.close()method explicitly in the listener implementation.NOTE: adding this listener changes the behavior of the dialog. Dialog is closed automatically in case there are no any close listeners. And the
JmixSideDialog.close()method should be called explicitly to close the dialog in case there are close listeners.- Parameters:
listener- listener to add- Returns:
- a registration for removing the listener
-