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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classApplication 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.StateChangeEventNested 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.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected VBoxLayoutprotected Messagesprotected AppWorkArea.Modestatic final Stringstatic final Stringprotected booleanstatic final Stringprotected JmixSingleModeContainerprotected AppWorkArea.Statestatic final Stringstatic final Stringstatic final Stringprotected HasTabSheetBehaviourprotected intstatic final StringFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.AppWorkArea
NAMEFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that will be notified when a work area state is changed.voidattached()Notifies all listeners that component has been attached.protected voidcloseAllTabWindows(com.vaadin.ui.ComponentContainer container) protected voidcloseOtherTabWindows(com.vaadin.ui.ComponentContainer container) protected voidcloseWindowByShortcut(RootWindow topLevelWindow) protected booleancloseWindowStack(Screens.WindowStack windowStack) protected com.vaadin.event.ShortcutListenercreateCloseShortcut(RootWindow topLevelWindow) protected com.vaadin.ui.CssLayoutprotected VBoxLayoutprotected com.vaadin.event.ShortcutListenercreateNextWindowTabShortcut(RootWindow topLevelWindow) protected com.vaadin.event.ShortcutListenercreatePreviousWindowTabShortcut(RootWindow topLevelWindow) protected JmixSingleModeContainerprotected HasTabSheetBehaviourprotected com.vaadin.event.Action.Handlervoiddetached()Notifies all listeners that component has been detached.protected voidfireTabChangedEvent(TabSheetBehaviour tabSheet) intReturns all active screens that are inside the work area.Returns all screens that are inside the current breadcrumbs.protected TabWindowContainergetMode()intReturns all opened screens that are inside the work area.getState()Styles implementation is client-type-specific.protected List<WindowBreadCrumbs>protected booleanprotected voidinitComponent(com.vaadin.ui.CssLayout component) protected voidbooleanisNotCloseable(Window window) protected booleanisWindowClosePrevented(Window window, Window.CloseOrigin closeOrigin) protected voidprotected voidmoveFocus(TabSheetBehaviour tabSheet, String tabId) protected voidreflectTabChangeToUrl(boolean userOriginated) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidvoidsetInitialLayout(VBoxLayout initialLayout) Sets the initial layout.voidsetMode(AppWorkArea.Mode mode) Sets a mode.voidsetStyleName(String name) Sets one or more style names of the component, replacing any previous styles.voidswitchTo(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, 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.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, withUnwrappedCompositionMethods 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:
setApplicationContextin classAbstractComponent<com.vaadin.ui.CssLayout>
-
createInitialLayout
-
setStyleName
Description copied from interface:ComponentSets 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:
setStyleNamein interfaceComponent- Overrides:
setStyleNamein classAbstractComponent<com.vaadin.ui.CssLayout>- Parameters:
name- one or more style names separated by space.
-
getStyleName
Description copied from interface:ComponentStyles implementation is client-type-specific.- Specified by:
getStyleNamein interfaceComponent- Overrides:
getStyleNamein classAbstractComponent<com.vaadin.ui.CssLayout>- Returns:
- current style name.
-
setFrame
- Specified by:
setFramein interfaceComponent.BelongToFrame- Overrides:
setFramein classAbstractComponent<com.vaadin.ui.CssLayout>
-
getInitialLayout
- Specified by:
getInitialLayoutin interfaceAppWorkArea- Returns:
- an initial layout
-
setInitialLayout
Description copied from interface:AppWorkAreaSets the initial layout.Unable to change initial layout in
AppWorkArea.State.WINDOW_CONTAINERstate.- Specified by:
setInitialLayoutin interfaceAppWorkArea- Parameters:
initialLayout- an initial layout- See Also:
-
addStateChangeListener
Description copied from interface:AppWorkAreaAdds a listener that will be notified when a work area state is changed.- Specified by:
addStateChangeListenerin interfaceAppWorkArea- Parameters:
listener- a listener to add- Returns:
- a registration object for removing an event listener
-
getMode
- Specified by:
getModein interfaceAppWorkArea- Returns:
- a mode
-
setMode
Description copied from interface:AppWorkAreaSets a mode. The default value isAppWorkArea.Mode.TABBED.Unable to change a mode in
AppWorkArea.State.WINDOW_CONTAINERstate.- Specified by:
setModein 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:AppWorkAreaINTERNAL. Managed by the screen control mechanismScreens.Sets a new state. The default value is
AppWorkArea.State.INITIAL_LAYOUT.- Specified by:
switchToin interfaceAppWorkArea- Parameters:
state- new state
-
getState
- Specified by:
getStatein interfaceAppWorkArea- Returns:
- a state
-
getInnerComponents
- Specified by:
getInnerComponentsin interfaceHasInnerComponents
-
attached
public void attached()Description copied from interface:AttachNotifierNotifies all listeners that component has been attached.- Specified by:
attachedin interfaceAttachNotifier- Overrides:
attachedin classAbstractComponent<com.vaadin.ui.CssLayout>
-
detached
public void detached()Description copied from interface:AttachNotifierNotifies all listeners that component has been detached.- Specified by:
detachedin interfaceAttachNotifier- Overrides:
detachedin classAbstractComponent<com.vaadin.ui.CssLayout>
-
getOpenedTabCount
public int getOpenedTabCount() -
getOpenedWorkAreaScreensStream
Description copied from interface:AppWorkAreaReturns all opened screens that are inside the work area.- Specified by:
getOpenedWorkAreaScreensStreamin interfaceAppWorkArea- Returns:
- opened screens stream
-
getActiveWorkAreaScreensStream
Description copied from interface:AppWorkAreaReturns all active screens that are inside the work area.- Specified by:
getActiveWorkAreaScreensStreamin interfaceAppWorkArea- Returns:
- active screens stream
-
getCurrentBreadcrumbs
Description copied from interface:AppWorkAreaReturns all screens that are inside the current breadcrumbs.- Specified by:
getCurrentBreadcrumbsin 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
-