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
Modifier and TypeClassDescriptionprotected class
static class
Nested 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.ExpandingLayout
ExpandingLayout.ExpandDirection
Nested classes/interfaces inherited from interface io.jmix.ui.component.Window
Window.BeforeCloseEvent, Window.CloseOrigin, Window.Committable, Window.ContentSwitchMode, Window.HasUserIndicator, Window.HasWorkArea
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected JmixWindow
protected Notifications
protected UiScreenProperties
protected Screens
Fields 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, resolvedState
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.DialogWindow
NAME
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
center()
Sets this window to be centered on screen.protected JmixWindow
com.vaadin.ui.Component
float
float
int
int
boolean
boolean
boolean
isModal()
boolean
protected void
onCloseButtonClick
(JmixWindow.PreCloseEvent preCloseEvent) protected void
onCloseShortcutTriggered
(Object sender, Object target) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setCaption
(String caption) Sets the component's caption.void
setCloseable
(boolean closeable) Sets the closable status for the window.void
setCloseOnClickOutside
(boolean closeOnClickOutside) Sets if window can be closed by click outside of window content (by modality curtain).void
setDescription
(String description) Sets the component's description.void
setDialogHeight
(String dialogHeight) Sets dialog height.void
setDialogStylename
(String stylename) Sets the custom CSS style.void
setDialogWidth
(String dialogWidth) Sets dialog width.void
setDraggable
(boolean draggable) Enables or disables that a window can be dragged (moved) by the user.void
Set an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.void
setModal
(boolean modal) Sets window modality.void
setNotifications
(Notifications notifications) void
setPositionX
(int positionX) Sets the distance of Window left border in pixels from left border of the containing (main window).void
setPositionY
(int positionY) Sets the distance of Window top border in pixels from top border of the containing (main window).void
setResizable
(boolean resizable) Sets window resizable.void
setScreenProperties
(UiScreenProperties screenProperties) void
setScreens
(Screens screens) protected void
protected void
protected void
void
setWindowMode
(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, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.ActionsHolder
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActions
Methods 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAll
Methods inherited from interface io.jmix.ui.component.DialogWindow
setPosition
Methods inherited from interface io.jmix.ui.component.ExpandingLayout
expand, getExpandDirection, isExpanded, resetExpanded
Methods inherited from interface io.jmix.ui.component.Frame
addFacet, getFacet, getFacetNN, getFacets, isValid, removeFacet, validate
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream
Methods inherited from interface io.jmix.ui.component.HasMargin
getMargin, setMargin, setMargin, setMargin
Methods inherited from interface io.jmix.ui.component.HasSpacing
getSpacing, setSpacing
Methods inherited from interface io.jmix.ui.component.OrderedContainer
add, getComponent, getComponentNN, indexOf
Methods inherited from interface io.jmix.ui.component.SupportsExpandRatio
getExpandRatio, setExpandRatio
Methods 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:
afterPropertiesSet
in 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.HasIcon
Set an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.- Specified by:
setIcon
in interfaceComponent.HasIcon
- Overrides:
setIcon
in classWindowImpl
-
setCaption
Description copied from interface:Component.HasCaption
Sets the component's caption.- Specified by:
setCaption
in interfaceComponent.HasCaption
- Overrides:
setCaption
in classWindowImpl
- Parameters:
caption
- the new component's caption
-
setDescription
Description copied from interface:Component.HasDescription
Sets the component's description.- Specified by:
setDescription
in interfaceComponent.HasDescription
- Overrides:
setDescription
in classWindowImpl
- Parameters:
description
- the new description to set
-
getComposition
public com.vaadin.ui.Component getComposition()- Specified by:
getComposition
in interfaceComponent.Wrapper
- Overrides:
getComposition
in classWindowImpl
-
setDialogWidth
Description copied from interface:DialogWindow
Sets dialog width.- Specified by:
setDialogWidth
in interfaceDialogWindow
- Parameters:
dialogWidth
- width
-
getDialogWidth
public float getDialogWidth()- Specified by:
getDialogWidth
in interfaceDialogWindow
- Returns:
- dialog width
-
getDialogWidthUnit
- Specified by:
getDialogWidthUnit
in interfaceDialogWindow
- Returns:
- dialog width unit
-
setDialogHeight
Description copied from interface:DialogWindow
Sets dialog height.- Specified by:
setDialogHeight
in interfaceDialogWindow
- Parameters:
dialogHeight
- height
-
getDialogHeight
public float getDialogHeight()- Specified by:
getDialogHeight
in interfaceDialogWindow
- Returns:
- height
-
getDialogHeightUnit
- Specified by:
getDialogHeightUnit
in interfaceDialogWindow
- Returns:
- dialog height unit
-
setDialogStylename
Description copied from interface:DialogWindow
Sets the custom CSS style.- Specified by:
setDialogStylename
in interfaceDialogWindow
- Parameters:
stylename
- style name
-
getDialogStylename
- Specified by:
getDialogStylename
in interfaceDialogWindow
- Returns:
- custom style name
-
setResizable
public void setResizable(boolean resizable) Description copied from interface:DialogWindow
Sets window resizable.- Specified by:
setResizable
in interfaceDialogWindow
- Parameters:
resizable
- resizable flag
-
isResizable
public boolean isResizable()- Specified by:
isResizable
in interfaceDialogWindow
- Returns:
- true if window is resizable by the end-user, otherwise false.
-
setDraggable
public void setDraggable(boolean draggable) Description copied from interface:DialogWindow
Enables or disables that a window can be dragged (moved) by the user. By default a window is draggable.- Specified by:
setDraggable
in interfaceDialogWindow
- Parameters:
draggable
- draggable flag
-
isDraggable
public boolean isDraggable()- Specified by:
isDraggable
in interfaceDialogWindow
- Returns:
- true if window is draggable
-
setCloseable
public void setCloseable(boolean closeable) Description copied from interface:Window
Sets the closable status for the window.- Specified by:
setCloseable
in interfaceWindow
- Overrides:
setCloseable
in classWindowImpl
- Parameters:
closeable
- closeable flag
-
setModal
public void setModal(boolean modal) Description copied from interface:DialogWindow
Sets window modality. When a modal window is open, components outside that window cannot be accessed.- Specified by:
setModal
in interfaceDialogWindow
- Parameters:
modal
- modal flag
-
isModal
public boolean isModal()- Specified by:
isModal
in interfaceDialogWindow
- Returns:
- true if window is modal
-
setCloseOnClickOutside
public void setCloseOnClickOutside(boolean closeOnClickOutside) Description copied from interface:DialogWindow
Sets if window can be closed by click outside of window content (by modality curtain).- Specified by:
setCloseOnClickOutside
in interfaceDialogWindow
- Parameters:
closeOnClickOutside
- true if window to be closed by click outside of window content (by modality curtain)
-
isCloseOnClickOutside
public boolean isCloseOnClickOutside()- Specified by:
isCloseOnClickOutside
in interfaceDialogWindow
- Returns:
- true if window can be closed by click outside of window content (by modality curtain)
-
setWindowMode
Description copied from interface:DialogWindow
Sets the mode for the window.- Specified by:
setWindowMode
in interfaceDialogWindow
- Parameters:
mode
- mode
-
getWindowMode
- Specified by:
getWindowMode
in interfaceDialogWindow
- Returns:
- the mode of the window
-
center
public void center()Description copied from interface:DialogWindow
Sets this window to be centered on screen.- Specified by:
center
in interfaceDialogWindow
-
setPositionX
public void setPositionX(int positionX) Description copied from interface:DialogWindow
Sets the distance of Window left border in pixels from left border of the containing (main window).- Specified by:
setPositionX
in interfaceDialogWindow
- Parameters:
positionX
- left position in pixels
-
getPositionX
public int getPositionX()- Specified by:
getPositionX
in 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:DialogWindow
Sets the distance of Window top border in pixels from top border of the containing (main window).- Specified by:
setPositionY
in interfaceDialogWindow
- Parameters:
positionY
- top position in pixels
-
getPositionY
public int getPositionY()- Specified by:
getPositionY
in interfaceDialogWindow
- Returns:
- distance of Window top border in pixels from top border of the containing (main window) or -1 if unspecified
-