Package io.jmix.ui.component.impl
Class DialogWindowImpl
java.lang.Object
io.jmix.ui.component.impl.WindowImpl
io.jmix.ui.component.impl.DialogWindowImpl
- All Implemented Interfaces:
ActionsHolder,Component,Component.BelongToFrame,Component.HasCaption,Component.HasDescription,Component.HasIcon,Component.HasXmlDescriptor,Component.Wrapper,ComponentContainer,DialogWindow,ExpandingLayout,Frame,HasComponents,HasMargin,HasSpacing,HasSubParts,FrameImplementation,WindowImplementation,OrderedContainer,SecuredActionsHolder,SupportsExpandRatio,Window,org.springframework.beans.factory.InitializingBean
public class DialogWindowImpl
extends WindowImpl
implements DialogWindow, org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classstatic classNested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.ExpandingLayout
ExpandingLayout.ExpandDirectionNested classes/interfaces inherited from interface io.jmix.ui.component.Window
Window.BeforeCloseEvent, Window.CloseOrigin, Window.Committable, Window.ContentSwitchMode, Window.HasUserIndicator, Window.HasWorkArea -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected JmixWindowprotected Notificationsprotected UiScreenPropertiesprotected ScreensFields inherited from class io.jmix.ui.component.impl.WindowImpl
actionsHolder, actionsPermissions, allComponents, C_WINDOW_LAYOUT, caption, closeable, component, context, defaultScreenWindow, description, element, facets, focusComponentId, frameOwner, icon, icons, id, ownComponents, resolvedStateFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.ui.component.DialogWindow
NAMEFields inherited from interface io.jmix.ui.component.Window
BROWSE_WINDOW_SUFFIX, CLOSE_ACTION_ID, COMMIT_ACTION_ID, CREATE_WINDOW_SUFFIX, EDITOR_WINDOW_SUFFIX, LOOKUP_WINDOW_SUFFIX, SELECT_ACTION_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcenter()Sets this window to be centered on screen.protected JmixWindowcom.vaadin.ui.ComponentfloatfloatintintbooleanbooleanbooleanisModal()booleanprotected voidonCloseButtonClick(JmixWindow.PreCloseEvent preCloseEvent) protected voidonCloseShortcutTriggered(Object sender, Object target) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetCaption(String caption) Sets the component's caption.voidsetCloseable(boolean closeable) Sets the closable status for the window.voidsetCloseOnClickOutside(boolean closeOnClickOutside) Sets if window can be closed by click outside of window content (by modality curtain).voidsetDescription(String description) Sets the component's description.voidsetDialogHeight(String dialogHeight) Sets dialog height.voidsetDialogStylename(String stylename) Sets the custom CSS style.voidsetDialogWidth(String dialogWidth) Sets dialog width.voidsetDraggable(boolean draggable) Enables or disables that a window can be dragged (moved) by the user.voidSet an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.voidsetModal(boolean modal) Sets window modality.voidsetNotifications(Notifications notifications) voidsetPositionX(int positionX) Sets the distance of Window left border in pixels from left border of the containing (main window).voidsetPositionY(int positionY) Sets the distance of Window top border in pixels from top border of the containing (main window).voidsetResizable(boolean resizable) Sets window resizable.voidsetScreenProperties(UiScreenProperties screenProperties) voidsetScreens(Screens screens) protected voidprotected voidprotected voidvoidsetWindowMode(WindowMode mode) Sets the mode for the window.Methods inherited from class io.jmix.ui.component.impl.WindowImpl
add, add, addAction, addAction, addBeforeWindowCloseListener, addFacet, addStyleName, createLayout, disableEventListeners, enableEventListeners, expand, findAndFocusChildComponent, fireBeforeClose, getAction, getActions, getActionsPermissions, getAlignment, getCaption, getComponent, getComponent, getComponent, getComponents, getComponentToFocus, getContainer, getContext, getDescription, getEventHub, getExpandDirection, getExpandRatio, getFacet, getFacets, getFocusComponent, getFrame, getFrameOwner, getHeight, getHeightSizeUnit, getIcon, getId, getMargin, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOwnComponent, getOwnComponents, getOwnComponentsStream, getParent, getRegisteredComponent, getResolvedState, getSpacing, getStyleName, getWidth, getWidthSizeUnit, getXmlDescriptor, handleValidationErrors, indexOf, initUiEventListeners, isCloseable, isDefaultScreenWindow, isEnabled, isEnabledRecursive, isExpanded, isResponsive, isValid, isVisible, isVisibleRecursive, publish, registerComponent, remove, removeAction, removeAction, removeAll, removeAllActions, removeFacet, removeStyleName, resetExpanded, setAlignment, setContext, setDefaultScreenWindow, setEnabled, setExpandRatio, setFocusComponent, setFrame, setFrameOwner, setHeight, setIconFromSet, setIcons, setId, setMargin, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setParent, setResolvedState, setResponsive, setSpacing, setStyleName, setVisible, setWidth, setXmlDescriptor, unregisterComponent, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, validate, validate, validateAll, withUnwrapped, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.ActionsHolder
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActionsMethods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAllMethods inherited from interface io.jmix.ui.component.DialogWindow
setPositionMethods inherited from interface io.jmix.ui.component.ExpandingLayout
expand, getExpandDirection, isExpanded, resetExpandedMethods inherited from interface io.jmix.ui.component.Frame
addFacet, getFacet, getFacetNN, getFacets, isValid, removeFacet, validateMethods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStreamMethods inherited from interface io.jmix.ui.component.HasMargin
getMargin, setMargin, setMargin, setMarginMethods inherited from interface io.jmix.ui.component.HasSpacing
getSpacing, setSpacingMethods inherited from interface io.jmix.ui.component.OrderedContainer
add, getComponent, getComponentNN, indexOfMethods inherited from interface io.jmix.ui.component.SupportsExpandRatio
getExpandRatio, setExpandRatioMethods inherited from interface io.jmix.ui.component.Window
addBeforeWindowCloseListener, getContext, getFocusComponent, getFrameOwner, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, isCloseable, setFocusComponent, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, validate, validateAll
-
Field Details
-
dialogWindow
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
notifications
-
screens
-
screenProperties
-
-
Constructor Details
-
DialogWindowImpl
public DialogWindowImpl()
-
-
Method Details
-
createComponent
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
setupDefaultSize
protected void setupDefaultSize() -
setupContextMenu
protected void setupContextMenu() -
setupDialogShortcuts
protected void setupDialogShortcuts() -
onCloseButtonClick
-
onCloseShortcutTriggered
-
setApplicationContext
@Autowired public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) -
setNotifications
-
setScreens
-
setScreenProperties
-
setIcon
Description copied from interface:Component.HasIconSet an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.- Specified by:
setIconin interfaceComponent.HasIcon- Overrides:
setIconin classWindowImpl
-
setCaption
Description copied from interface:Component.HasCaptionSets the component's caption.- Specified by:
setCaptionin interfaceComponent.HasCaption- Overrides:
setCaptionin classWindowImpl- Parameters:
caption- the new component's caption
-
setDescription
Description copied from interface:Component.HasDescriptionSets the component's description.- Specified by:
setDescriptionin interfaceComponent.HasDescription- Overrides:
setDescriptionin classWindowImpl- Parameters:
description- the new description to set
-
getComposition
public com.vaadin.ui.Component getComposition()- Specified by:
getCompositionin interfaceComponent.Wrapper- Overrides:
getCompositionin classWindowImpl
-
setDialogWidth
Description copied from interface:DialogWindowSets dialog width.- Specified by:
setDialogWidthin interfaceDialogWindow- Parameters:
dialogWidth- width
-
getDialogWidth
public float getDialogWidth()- Specified by:
getDialogWidthin interfaceDialogWindow- Returns:
- dialog width
-
getDialogWidthUnit
- Specified by:
getDialogWidthUnitin interfaceDialogWindow- Returns:
- dialog width unit
-
setDialogHeight
Description copied from interface:DialogWindowSets dialog height.- Specified by:
setDialogHeightin interfaceDialogWindow- Parameters:
dialogHeight- height
-
getDialogHeight
public float getDialogHeight()- Specified by:
getDialogHeightin interfaceDialogWindow- Returns:
- height
-
getDialogHeightUnit
- Specified by:
getDialogHeightUnitin interfaceDialogWindow- Returns:
- dialog height unit
-
setDialogStylename
Description copied from interface:DialogWindowSets the custom CSS style.- Specified by:
setDialogStylenamein interfaceDialogWindow- Parameters:
stylename- style name
-
getDialogStylename
- Specified by:
getDialogStylenamein interfaceDialogWindow- Returns:
- custom style name
-
setResizable
public void setResizable(boolean resizable) Description copied from interface:DialogWindowSets window resizable.- Specified by:
setResizablein interfaceDialogWindow- Parameters:
resizable- resizable flag
-
isResizable
public boolean isResizable()- Specified by:
isResizablein interfaceDialogWindow- Returns:
- true if window is resizable by the end-user, otherwise false.
-
setDraggable
public void setDraggable(boolean draggable) Description copied from interface:DialogWindowEnables or disables that a window can be dragged (moved) by the user. By default a window is draggable.- Specified by:
setDraggablein interfaceDialogWindow- Parameters:
draggable- draggable flag
-
isDraggable
public boolean isDraggable()- Specified by:
isDraggablein interfaceDialogWindow- Returns:
- true if window is draggable
-
setCloseable
public void setCloseable(boolean closeable) Description copied from interface:WindowSets the closable status for the window.- Specified by:
setCloseablein interfaceWindow- Overrides:
setCloseablein classWindowImpl- Parameters:
closeable- closeable flag
-
setModal
public void setModal(boolean modal) Description copied from interface:DialogWindowSets window modality. When a modal window is open, components outside that window cannot be accessed.- Specified by:
setModalin interfaceDialogWindow- Parameters:
modal- modal flag
-
isModal
public boolean isModal()- Specified by:
isModalin interfaceDialogWindow- Returns:
- true if window is modal
-
setCloseOnClickOutside
public void setCloseOnClickOutside(boolean closeOnClickOutside) Description copied from interface:DialogWindowSets if window can be closed by click outside of window content (by modality curtain).- Specified by:
setCloseOnClickOutsidein interfaceDialogWindow- Parameters:
closeOnClickOutside- true if window to be closed by click outside of window content (by modality curtain)
-
isCloseOnClickOutside
public boolean isCloseOnClickOutside()- Specified by:
isCloseOnClickOutsidein interfaceDialogWindow- Returns:
- true if window can be closed by click outside of window content (by modality curtain)
-
setWindowMode
Description copied from interface:DialogWindowSets the mode for the window.- Specified by:
setWindowModein interfaceDialogWindow- Parameters:
mode- mode
-
getWindowMode
- Specified by:
getWindowModein interfaceDialogWindow- Returns:
- the mode of the window
-
center
public void center()Description copied from interface:DialogWindowSets this window to be centered on screen.- Specified by:
centerin interfaceDialogWindow
-
setPositionX
public void setPositionX(int positionX) Description copied from interface:DialogWindowSets the distance of Window left border in pixels from left border of the containing (main window).- Specified by:
setPositionXin interfaceDialogWindow- Parameters:
positionX- left position in pixels
-
getPositionX
public int getPositionX()- Specified by:
getPositionXin interfaceDialogWindow- Returns:
- the distance of Window left border in pixels from left border of the containing (main window) or -1 if unspecified
-
setPositionY
public void setPositionY(int positionY) Description copied from interface:DialogWindowSets the distance of Window top border in pixels from top border of the containing (main window).- Specified by:
setPositionYin interfaceDialogWindow- Parameters:
positionY- top position in pixels
-
getPositionY
public int getPositionY()- Specified by:
getPositionYin interfaceDialogWindow- Returns:
- distance of Window top border in pixels from top border of the containing (main window) or -1 if unspecified
-