Package io.jmix.ui
Interface Screens
- All Known Implementing Classes:
ScreensImpl
public interface Screens
Interface defining methods for creation and displaying of UI screens.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Provides information about opened screens, does not store state.static interface
Represents single tab / window stack inAppWorkArea
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final CloseAction
Constant that is passed toScreen.close(CloseAction)
when the screen is closed by screens manager.static final String
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends Screen>
TCreates a screen by its controller class.default <T extends Screen>
TCreates a screen by its controller class.<T extends Screen>
Tcreate
(Class<T> screenClass, OpenMode openMode, ScreenOptions options) Creates a screen by its controller class.default Screen
Creates a screen by its screen id.create
(String screenId, OpenMode openMode, ScreenOptions options) Creates a screen by its screen id.boolean
Check if there are screens that have unsaved changes.void
Removes screen from UI and releases all the resources of screen.void
Removes all child screens (screens of work area and dialog screens) from the root screen and releases their resources.Displays the given screen according to itsOpenMode
.showFromNavigation
(Screen screen) Displays the given screen taking into account already opened screens and multipleOpen option.
-
Field Details
-
NAVIGATION_CLOSE_ACTION_ID
- See Also:
-
NAVIGATION_CLOSE_ACTION
Constant that is passed toScreen.close(CloseAction)
when the screen is closed by screens manager.
-
-
Method Details
-
create
Creates a screen by its controller class.By default, the screen will be opened in the current tab of the main window (
OpenMode.THIS_TAB
).- Parameters:
screenClass
- screen controller class
-
create
Creates a screen by its controller class.- Parameters:
screenClass
- screen controller classopenMode
- how the screen should be opened
-
create
Creates a screen by its screen id.- Parameters:
screenId
- screen idopenMode
- how the screen should be opened
-
create
Creates a screen by its controller class.- Parameters:
screenClass
- screen controller classopenMode
- how the screen should be openedoptions
- screen parameters
-
create
Creates a screen by its screen id.- Parameters:
screenId
- screen idopenMode
- how the screen should be openedoptions
- screen parameters
-
show
Displays the given screen according to itsOpenMode
.- Parameters:
screen
- screen- Returns:
OperationResult.success()
if screen is shown or otherwiseOperationResult.fail()
-
remove
Removes screen from UI and releases all the resources of screen.- Parameters:
screen
- screen
-
removeAll
void removeAll()Removes all child screens (screens of work area and dialog screens) from the root screen and releases their resources. -
hasUnsavedChanges
boolean hasUnsavedChanges()Check if there are screens that have unsaved changes.- Returns:
- true if there are screens with unsaved changes
-
getOpenedScreens
Screens.OpenedScreens getOpenedScreens()- Returns:
- object that provides information about opened screens
-
getConfiguredWorkAreaOrNull
-