public class AppWorkAreaImpl extends AbstractComponent<com.vaadin.ui.CssLayout> implements AppWorkArea, HasInnerComponents
Modifier and Type | Class and Description |
---|---|
static class |
AppWorkAreaImpl.TabSheetReorderingDropHandler |
static class |
AppWorkAreaImpl.WorkAreaTabChangedEvent
Application event that is sent after selected tab changed in the main TabSheet.
|
AppWorkArea.Mode, AppWorkArea.State, AppWorkArea.StateChangeEvent
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INITIAL_LAYOUT_STYLENAME |
protected VBoxLayout |
initialLayout |
protected io.jmix.core.Messages |
messages |
protected AppWorkArea.Mode |
mode |
static java.lang.String |
MODE_SINGLE_STYLENAME |
static java.lang.String |
MODE_TABBED_STYLENAME |
protected boolean |
shortcutsInitialized |
static java.lang.String |
SINGLE_CONTAINER_STYLENAME |
protected JmixSingleModeContainer |
singleContainer |
protected AppWorkArea.State |
state |
static java.lang.String |
STATE_INITIAL_STYLENAME |
static java.lang.String |
STATE_WINDOWS_STYLENAME |
static java.lang.String |
TABBED_CONTAINER_STYLENAME |
protected HasTabSheetBehaviour |
tabbedContainer |
protected int |
urlStateCounter |
static java.lang.String |
WORKAREA_STYLENAME |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
NAME
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
AppWorkAreaImpl() |
Modifier and Type | Method and Description |
---|---|
io.jmix.core.common.event.Subscription |
addStateChangeListener(java.util.function.Consumer<AppWorkArea.StateChangeEvent> listener)
Adds a listener that will be notified when a work area state is changed.
|
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 |
createComponent() |
protected VBoxLayout |
createInitialLayout() |
protected com.vaadin.event.ShortcutListener |
createNextWindowTabShortcut(RootWindow topLevelWindow) |
protected com.vaadin.event.ShortcutListener |
createPreviousWindowTabShortcut(RootWindow topLevelWindow) |
protected JmixSingleModeContainer |
createSingleModeContainer() |
protected HasTabSheetBehaviour |
createTabbedModeContainer() |
protected com.vaadin.event.Action.Handler |
createTabSheetActionHandler(HasTabSheetBehaviour tabSheet) |
protected void |
fireTabChangedEvent(TabSheetBehaviour tabSheet) |
int |
generateUrlStateMark() |
java.util.stream.Stream<Screen> |
getActiveWorkAreaScreensStream()
Returns all active screens that are inside the work area.
|
java.util.Collection<Screen> |
getCurrentBreadcrumbs()
Returns all screens that are inside the current breadcrumbs.
|
protected TabWindowContainer |
getCurrentWindowContainer() |
VBoxLayout |
getInitialLayout() |
java.util.Collection<Component> |
getInnerComponents() |
AppWorkArea.Mode |
getMode() |
int |
getOpenedTabCount() |
java.util.stream.Stream<Screen> |
getOpenedWorkAreaScreensStream()
Returns all opened screens that are inside the work area.
|
JmixSingleModeContainer |
getSingleWindowContainer() |
AppWorkArea.State |
getState() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
HasTabSheetBehaviour |
getTabbedWindowContainer() |
protected java.util.List<WindowBreadCrumbs> |
getWindowStacks() |
protected boolean |
hasModalWindow() |
protected void |
initComponent(com.vaadin.ui.CssLayout component) |
protected void |
initTabShortcuts() |
boolean |
isNotCloseable(Window window) |
protected boolean |
isWindowClosePrevented(Window window,
Window.CloseOrigin closeOrigin) |
protected void |
loadModeFromSettings() |
protected void |
moveFocus(TabSheetBehaviour tabSheet,
java.lang.String tabId) |
protected void |
reflectTabChangeToUrl(boolean userOriginated) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setFrame(Frame frame) |
void |
setInitialLayout(VBoxLayout initialLayout)
Sets the initial layout.
|
void |
setMode(AppWorkArea.Mode mode)
Sets a mode.
|
void |
setStyleName(java.lang.String name)
Sets one or more style names of the component, replacing any
previous styles.
|
void |
switchTo(AppWorkArea.State state)
INTERNAL.
|
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFrame
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
public static final java.lang.String WORKAREA_STYLENAME
public static final java.lang.String MODE_TABBED_STYLENAME
public static final java.lang.String MODE_SINGLE_STYLENAME
public static final java.lang.String STATE_INITIAL_STYLENAME
public static final java.lang.String STATE_WINDOWS_STYLENAME
public static final java.lang.String SINGLE_CONTAINER_STYLENAME
public static final java.lang.String TABBED_CONTAINER_STYLENAME
public static final java.lang.String INITIAL_LAYOUT_STYLENAME
protected AppWorkArea.Mode mode
protected AppWorkArea.State state
protected VBoxLayout initialLayout
protected HasTabSheetBehaviour tabbedContainer
protected JmixSingleModeContainer singleContainer
protected boolean shortcutsInitialized
protected int urlStateCounter
protected io.jmix.core.Messages messages
protected void initComponent(com.vaadin.ui.CssLayout component)
protected com.vaadin.ui.CssLayout createComponent()
@Autowired public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext
in class AbstractComponent<com.vaadin.ui.CssLayout>
protected VBoxLayout createInitialLayout()
public void setStyleName(@Nullable java.lang.String name)
Component
setStyleName
in interface Component
setStyleName
in class AbstractComponent<com.vaadin.ui.CssLayout>
name
- one or more style names separated by space.public java.lang.String getStyleName()
Component
getStyleName
in interface Component
getStyleName
in class AbstractComponent<com.vaadin.ui.CssLayout>
public void setFrame(@Nullable Frame frame)
setFrame
in interface Component.BelongToFrame
setFrame
in class AbstractComponent<com.vaadin.ui.CssLayout>
@Nullable public VBoxLayout getInitialLayout()
getInitialLayout
in interface AppWorkArea
public void setInitialLayout(VBoxLayout initialLayout)
AppWorkArea
Unable to change initial layout in AppWorkArea.State.WINDOW_CONTAINER
state.
setInitialLayout
in interface AppWorkArea
initialLayout
- an initial layoutVBoxLayout
public io.jmix.core.common.event.Subscription addStateChangeListener(java.util.function.Consumer<AppWorkArea.StateChangeEvent> listener)
AppWorkArea
addStateChangeListener
in interface AppWorkArea
listener
- a listener to addpublic AppWorkArea.Mode getMode()
getMode
in interface AppWorkArea
public void setMode(AppWorkArea.Mode mode)
AppWorkArea
AppWorkArea.Mode.TABBED
.
Unable to change a mode in AppWorkArea.State.WINDOW_CONTAINER
state.
setMode
in interface AppWorkArea
mode
- a modeprotected HasTabSheetBehaviour createTabbedModeContainer()
protected void reflectTabChangeToUrl(boolean userOriginated)
protected com.vaadin.event.Action.Handler createTabSheetActionHandler(HasTabSheetBehaviour tabSheet)
protected JmixSingleModeContainer createSingleModeContainer()
public HasTabSheetBehaviour getTabbedWindowContainer()
public JmixSingleModeContainer getSingleWindowContainer()
public void switchTo(AppWorkArea.State state)
AppWorkArea
Screens
.
Sets a new state. The default value is AppWorkArea.State.INITIAL_LAYOUT
.
switchTo
in interface AppWorkArea
state
- new statepublic AppWorkArea.State getState()
getState
in interface AppWorkArea
public java.util.Collection<Component> getInnerComponents()
getInnerComponents
in interface HasInnerComponents
public int getOpenedTabCount()
public java.util.stream.Stream<Screen> getOpenedWorkAreaScreensStream()
AppWorkArea
getOpenedWorkAreaScreensStream
in interface AppWorkArea
public java.util.stream.Stream<Screen> getActiveWorkAreaScreensStream()
AppWorkArea
getActiveWorkAreaScreensStream
in interface AppWorkArea
public java.util.Collection<Screen> getCurrentBreadcrumbs()
AppWorkArea
getCurrentBreadcrumbs
in interface AppWorkArea
protected boolean isWindowClosePrevented(Window window, Window.CloseOrigin closeOrigin)
protected void closeAllTabWindows(com.vaadin.ui.ComponentContainer container)
protected void closeOtherTabWindows(com.vaadin.ui.ComponentContainer container)
protected boolean closeWindowStack(Screens.WindowStack windowStack)
protected void initTabShortcuts()
protected com.vaadin.event.ShortcutListener createCloseShortcut(RootWindow topLevelWindow)
protected com.vaadin.event.ShortcutListener createNextWindowTabShortcut(RootWindow topLevelWindow)
protected com.vaadin.event.ShortcutListener createPreviousWindowTabShortcut(RootWindow topLevelWindow)
protected void closeWindowByShortcut(RootWindow topLevelWindow)
protected java.util.List<WindowBreadCrumbs> getWindowStacks()
protected void moveFocus(TabSheetBehaviour tabSheet, java.lang.String tabId)
public boolean isNotCloseable(Window window)
protected boolean hasModalWindow()
@Nullable protected TabWindowContainer getCurrentWindowContainer()
protected void loadModeFromSettings()
public int generateUrlStateMark()
protected void fireTabChangedEvent(TabSheetBehaviour tabSheet)