Package io.jmix.tabbedmode
Class Views.OpenedViews
java.lang.Object
io.jmix.tabbedmode.Views.OpenedViews
- Enclosing class:
- Views
A class that provides information about all opened views.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
closeAll()
Closes all child views (views ifWorkArea
and dialog windows) from the root view.Collection<View<?>>
Collection<View<?>>
Collection<View<?>>
getAll()
Collection<View<?>>
Collection<View<?>>
Collection<View<?>>
View<?>
boolean
Check if there are views that have unsaved changes.
-
Field Details
-
ui
-
openedDialogWindows
-
-
Constructor Details
-
OpenedViews
-
-
Method Details
-
getRootView
- Returns:
- the root view of the UI
- Throws:
IllegalStateException
- in case there is no root view in UI
-
findRootView
- Returns:
- the root view of the UI if present
-
getAll
- Returns:
- all opened views excluding the root view or empty collection
if the root view does not have
WorkArea
- Throws:
IllegalStateException
- in case there is no root view in UI
-
getOpenedWorkAreaViews
- Returns:
- all opened views excluding the root view and dialogs or empty collection
if the root view does not have
WorkArea
- Throws:
IllegalStateException
- in case there is no root view in UI
-
getActiveViews
- Returns:
- top views from work area tabs and all dialog windows or empty collection
if the root view does not have
WorkArea
- Throws:
IllegalStateException
- in case there is no root view in UI
-
getActiveWorkAreaViews
- Returns:
- top views from work area tabs or empty collection
if the root view does not have
WorkArea
- Throws:
IllegalStateException
- in case there is no root view in UI
-
getDialogWindows
- Returns:
- all views opened in a dialog window
-
getCurrentBreadcrumbs
- Returns:
- views of the currently opened tab of a
WorkArea
in descending order (first element is active view) or empty collection if the root view does not haveWorkArea
- Throws:
IllegalStateException
- in case there is no root view in UI
-
getWorkAreaViewStacks
- Returns:
- collection of view stacks representing each tab with access
to breadcrumbs or empty collection if the root view does not have
WorkArea
- Throws:
IllegalStateException
- in case there is no root view in UI
-
closeAll
public void closeAll()Closes all child views (views ifWorkArea
and dialog windows) from the root view. -
hasUnsavedChanges
public boolean hasUnsavedChanges()Check if there are views that have unsaved changes.- Returns:
true
if there are views with unsaved changes,false
otherwise
-