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:
  • Field Details

  • Method Details

    • create

      default <T extends Screen> T create(Class<T> screenClass)
      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

      default <T extends Screen> T create(Class<T> screenClass, OpenMode openMode)
      Creates a screen by its controller class.
      Parameters:
      screenClass - screen controller class
      openMode - how the screen should be opened
    • create

      default Screen create(String screenId, OpenMode openMode)
      Creates a screen by its screen id.
      Parameters:
      screenId - screen id
      openMode - how the screen should be opened
    • create

      <T extends Screen> T create(Class<T> screenClass, OpenMode openMode, ScreenOptions options)
      Creates a screen by its controller class.
      Parameters:
      screenClass - screen controller class
      openMode - how the screen should be opened
      options - screen parameters
    • create

      Screen create(String screenId, OpenMode openMode, ScreenOptions options)
      Creates a screen by its screen id.
      Parameters:
      screenId - screen id
      openMode - how the screen should be opened
      options - screen parameters
    • show

      OperationResult show(Screen screen)
      Displays the given screen according to its OpenMode.
      Parameters:
      screen - screen
      Returns:
      OperationResult.success() if screen is shown or otherwise OperationResult.fail()
    • showFromNavigation

      OperationResult showFromNavigation(Screen screen)
      Displays the given screen taking into account already opened screens and multipleOpen option.
      Parameters:
      screen - screen
      Returns:
      operation result
    • remove

      void remove(Screen screen)
      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

      @Nullable AppWorkArea getConfiguredWorkAreaOrNull()