Package io.jmix.ui.component.impl
Class AppWorkAreaImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<com.vaadin.ui.CssLayout>
io.jmix.ui.component.impl.AppWorkAreaImpl
- All Implemented Interfaces:
AppWorkArea
,AttachNotifier
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasInnerComponents
public class AppWorkAreaImpl
extends AbstractComponent<com.vaadin.ui.CssLayout>
implements AppWorkArea, HasInnerComponents
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Application event that is sent after selected tab changed in the main TabSheet.Nested classes/interfaces inherited from interface io.jmix.ui.component.AppWorkArea
AppWorkArea.Mode, AppWorkArea.State, AppWorkArea.StateChangeEvent
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.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected VBoxLayout
protected Messages
protected AppWorkArea.Mode
static final String
static final String
protected boolean
static final String
protected JmixSingleModeContainer
protected AppWorkArea.State
static final String
static final String
static final String
protected HasTabSheetBehaviour
protected int
static final String
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.AppWorkArea
NAME
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that will be notified when a work area state is changed.void
attached()
Notifies all listeners that component has been attached.protected void
closeAllTabWindows
(com.vaadin.ui.ComponentContainer container) protected void
closeOtherTabWindows
(com.vaadin.ui.ComponentContainer container) protected void
closeWindowByShortcut
(RootWindow topLevelWindow) protected boolean
closeWindowStack
(Screens.WindowStack windowStack) protected com.vaadin.event.ShortcutListener
createCloseShortcut
(RootWindow topLevelWindow) protected com.vaadin.ui.CssLayout
protected VBoxLayout
protected com.vaadin.event.ShortcutListener
createNextWindowTabShortcut
(RootWindow topLevelWindow) protected com.vaadin.event.ShortcutListener
createPreviousWindowTabShortcut
(RootWindow topLevelWindow) protected JmixSingleModeContainer
protected HasTabSheetBehaviour
protected com.vaadin.event.Action.Handler
void
detached()
Notifies all listeners that component has been detached.protected void
fireTabChangedEvent
(TabSheetBehaviour tabSheet) int
Returns all active screens that are inside the work area.Returns all screens that are inside the current breadcrumbs.protected TabWindowContainer
getMode()
int
Returns all opened screens that are inside the work area.getState()
Styles implementation is client-type-specific.protected List<WindowBreadCrumbs>
protected boolean
protected void
initComponent
(com.vaadin.ui.CssLayout component) protected void
boolean
isNotCloseable
(Window window) protected boolean
isWindowClosePrevented
(Window window, Window.CloseOrigin closeOrigin) protected void
protected void
moveFocus
(TabSheetBehaviour tabSheet, String tabId) protected void
reflectTabChangeToUrl
(boolean userOriginated) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
void
setInitialLayout
(VBoxLayout initialLayout) Sets the initial layout.void
setMode
(AppWorkArea.Mode mode) Sets a mode.void
setStyleName
(String name) Sets one or more style names of the component, replacing any previous styles.void
switchTo
(AppWorkArea.State state) INTERNAL.Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, 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.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame
-
Field Details
-
WORKAREA_STYLENAME
- See Also:
-
MODE_TABBED_STYLENAME
- See Also:
-
MODE_SINGLE_STYLENAME
- See Also:
-
STATE_INITIAL_STYLENAME
- See Also:
-
STATE_WINDOWS_STYLENAME
- See Also:
-
SINGLE_CONTAINER_STYLENAME
- See Also:
-
TABBED_CONTAINER_STYLENAME
- See Also:
-
INITIAL_LAYOUT_STYLENAME
- See Also:
-
mode
-
state
-
initialLayout
-
tabbedContainer
-
singleContainer
-
shortcutsInitialized
protected boolean shortcutsInitialized -
urlStateCounter
protected int urlStateCounter -
messages
-
-
Constructor Details
-
AppWorkAreaImpl
public AppWorkAreaImpl()
-
-
Method Details
-
initComponent
protected void initComponent(com.vaadin.ui.CssLayout component) -
createComponent
protected com.vaadin.ui.CssLayout createComponent() -
setApplicationContext
@Autowired public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Overrides:
setApplicationContext
in classAbstractComponent<com.vaadin.ui.CssLayout>
-
createInitialLayout
-
setStyleName
Description copied from interface:Component
Sets one or more style names of the component, replacing any previous styles. Multiple styles can be specified as a space-separated list of style names. Styles implementation is client-type-specific.- Specified by:
setStyleName
in interfaceComponent
- Overrides:
setStyleName
in classAbstractComponent<com.vaadin.ui.CssLayout>
- Parameters:
name
- one or more style names separated by space.
-
getStyleName
Description copied from interface:Component
Styles implementation is client-type-specific.- Specified by:
getStyleName
in interfaceComponent
- Overrides:
getStyleName
in classAbstractComponent<com.vaadin.ui.CssLayout>
- Returns:
- current style name.
-
setFrame
- Specified by:
setFrame
in interfaceComponent.BelongToFrame
- Overrides:
setFrame
in classAbstractComponent<com.vaadin.ui.CssLayout>
-
getInitialLayout
- Specified by:
getInitialLayout
in interfaceAppWorkArea
- Returns:
- an initial layout
-
setInitialLayout
Description copied from interface:AppWorkArea
Sets the initial layout.Unable to change initial layout in
AppWorkArea.State.WINDOW_CONTAINER
state.- Specified by:
setInitialLayout
in interfaceAppWorkArea
- Parameters:
initialLayout
- an initial layout- See Also:
-
addStateChangeListener
Description copied from interface:AppWorkArea
Adds a listener that will be notified when a work area state is changed.- Specified by:
addStateChangeListener
in interfaceAppWorkArea
- Parameters:
listener
- a listener to add- Returns:
- a registration object for removing an event listener
-
getMode
- Specified by:
getMode
in interfaceAppWorkArea
- Returns:
- a mode
-
setMode
Description copied from interface:AppWorkArea
Sets a mode. The default value isAppWorkArea.Mode.TABBED
.Unable to change a mode in
AppWorkArea.State.WINDOW_CONTAINER
state.- Specified by:
setMode
in interfaceAppWorkArea
- Parameters:
mode
- a mode
-
createTabbedModeContainer
-
reflectTabChangeToUrl
protected void reflectTabChangeToUrl(boolean userOriginated) -
createTabSheetActionHandler
protected com.vaadin.event.Action.Handler createTabSheetActionHandler(HasTabSheetBehaviour tabSheet) -
createSingleModeContainer
-
getTabbedWindowContainer
-
getSingleWindowContainer
-
switchTo
Description copied from interface:AppWorkArea
INTERNAL. Managed by the screen control mechanismScreens
.Sets a new state. The default value is
AppWorkArea.State.INITIAL_LAYOUT
.- Specified by:
switchTo
in interfaceAppWorkArea
- Parameters:
state
- new state
-
getState
- Specified by:
getState
in interfaceAppWorkArea
- Returns:
- a state
-
getInnerComponents
- Specified by:
getInnerComponents
in interfaceHasInnerComponents
-
attached
public void attached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been attached.- Specified by:
attached
in interfaceAttachNotifier
- Overrides:
attached
in classAbstractComponent<com.vaadin.ui.CssLayout>
-
detached
public void detached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been detached.- Specified by:
detached
in interfaceAttachNotifier
- Overrides:
detached
in classAbstractComponent<com.vaadin.ui.CssLayout>
-
getOpenedTabCount
public int getOpenedTabCount() -
getOpenedWorkAreaScreensStream
Description copied from interface:AppWorkArea
Returns all opened screens that are inside the work area.- Specified by:
getOpenedWorkAreaScreensStream
in interfaceAppWorkArea
- Returns:
- opened screens stream
-
getActiveWorkAreaScreensStream
Description copied from interface:AppWorkArea
Returns all active screens that are inside the work area.- Specified by:
getActiveWorkAreaScreensStream
in interfaceAppWorkArea
- Returns:
- active screens stream
-
getCurrentBreadcrumbs
Description copied from interface:AppWorkArea
Returns all screens that are inside the current breadcrumbs.- Specified by:
getCurrentBreadcrumbs
in interfaceAppWorkArea
- Returns:
- screens that are inside the current breadcrumbs
-
isWindowClosePrevented
-
closeAllTabWindows
protected void closeAllTabWindows(com.vaadin.ui.ComponentContainer container) -
closeOtherTabWindows
protected void closeOtherTabWindows(com.vaadin.ui.ComponentContainer container) -
closeWindowStack
-
initTabShortcuts
protected void initTabShortcuts() -
createCloseShortcut
-
createNextWindowTabShortcut
-
createPreviousWindowTabShortcut
protected com.vaadin.event.ShortcutListener createPreviousWindowTabShortcut(RootWindow topLevelWindow) -
closeWindowByShortcut
-
getWindowStacks
-
moveFocus
-
isNotCloseable
-
hasModalWindow
protected boolean hasModalWindow() -
getCurrentWindowContainer
-
loadModeFromSettings
protected void loadModeFromSettings() -
generateUrlStateMark
public int generateUrlStateMark() -
fireTabChangedEvent
-