Package io.jmix.ui.component
Interface Window
- All Superinterfaces:
ActionsHolder
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,ComponentContainer
,ExpandingLayout
,Frame
,HasComponents
,HasMargin
,HasSpacing
,HasSubParts
,OrderedContainer
,SupportsExpandRatio
- All Known Subinterfaces:
DialogWindow
,RootWindow
,TabWindow
,WindowImplementation
- All Known Implementing Classes:
DialogWindowImpl
,RootWindowImpl
,TabWindowImpl
,WindowImpl
Represents an independent window of application.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Event sent right before the window is closed by an external (relative to the window content) action, like the button in the window tab or by the Esc keyboard shortcut.static interface
Marker interface for all window close types, which describes the way a window was closed.static interface
Represents a window that can be committed on close.static enum
Defines how the managed main TabSheet switches a tab with the given window: hides or unloads its content.static interface
Window having a user indicator.static interface
Window having a work area.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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
Constant that should be passed toScreen.close(CloseAction)
methods when the screen is closed without commit.static final String
Constant that should be passed toScreen.close(CloseAction)
methods when the screen is closed after commit of changes.static final String
static final String
static final String
static final String
Constant that passed toScreen.close(CloseAction)
method when the lookup screen is closed with selected items.Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionRegisters a new before window close listener.boolean
void
setCloseable
(boolean closeable) Sets the closable status for the window.void
setFocusComponent
(String componentId) Sets a component to be focused after the screen is opened.void
setMaxHeight
(String maxHeight) Sets maximum CSS height for window layout.void
setMaxWidth
(String maxWidth) Sets maximum CSS width for window layout.void
setMinHeight
(String minHeight) Sets minimum CSS height for window layout.void
setMinWidth
(String minWidth) Sets minimum CSS width for window layout.boolean
validate
(List<Validatable> fields) Checks validity by invoking validators on specified components which support them and show validation result notification.boolean
Checks validity by invoking validators on all components which support them and show validation result notification.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, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAll
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
-
Field Details
-
COMMIT_ACTION_ID
Constant that should be passed toScreen.close(CloseAction)
methods when the screen is closed after commit of changes. Propagated toScreen.AfterCloseEvent
listeners.- See Also:
-
CLOSE_ACTION_ID
Constant that should be passed toScreen.close(CloseAction)
methods when the screen is closed without commit. Propagated toScreen.AfterCloseEvent
listeners.- See Also:
-
SELECT_ACTION_ID
Constant that passed toScreen.close(CloseAction)
method when the lookup screen is closed with selected items. Propagated toScreen.AfterCloseEvent
listeners.- See Also:
-
BROWSE_WINDOW_SUFFIX
- See Also:
-
LOOKUP_WINDOW_SUFFIX
- See Also:
-
EDITOR_WINDOW_SUFFIX
- See Also:
-
CREATE_WINDOW_SUFFIX
- See Also:
-
-
Method Details
-
setCloseable
void setCloseable(boolean closeable) Sets the closable status for the window.- Parameters:
closeable
- closeable flag
-
isCloseable
boolean isCloseable()- Returns:
- true if the window can be closed by user with close button or keyboard shortcut
-
setMinWidth
Sets minimum CSS width for window layout. Examples: "640px", "auto".- Parameters:
minWidth
- minimum width
-
getMinWidth
- Returns:
- previously set minimal CSS width or null
-
setMaxWidth
Sets maximum CSS width for window layout. Examples: "640px", "100%".- Parameters:
maxWidth
- maximum width
-
getMaxWidth
- Returns:
- previously set maximum CSS width or null
-
setMinHeight
Sets minimum CSS height for window layout. Examples: "640px", "auto".- Parameters:
minHeight
- minimum height
-
getMinHeight
- Returns:
- previously set minimum CSS height or null
-
setMaxHeight
Sets maximum CSS height for window layout. Examples: "640px", "100%".- Parameters:
maxHeight
- maximum height
-
getMaxHeight
- Returns:
- previously set maximum CSS height or null
-
getFrameOwner
Screen getFrameOwner()- Specified by:
getFrameOwner
in interfaceFrame
- Returns:
- UI controller of the window
- See Also:
-
getContext
WindowContext getContext()- Specified by:
getContext
in interfaceFrame
- Returns:
- current window context
-
setFocusComponent
Sets a component to be focused after the screen is opened.- Parameters:
componentId
- component's ID in XML. If null, then first focusable component will be focused
-
getFocusComponent
- Returns:
- an ID of the component which is set to be focused after the screen is opened
-
validate
Checks validity by invoking validators on specified components which support them and show validation result notification. -
validateAll
boolean validateAll()Checks validity by invoking validators on all components which support them and show validation result notification.- Specified by:
validateAll
in interfaceFrame
- Returns:
- true if the validation was successful, false if there were any problems
-
addBeforeWindowCloseListener
Registers a new before window close listener.- Parameters:
listener
- the listener to register- Returns:
- a registration object for removing an event listener added to a window
-