Interface ScreenController


public interface ScreenController
Opens screens. Strata.screens() returns the platform's controller, so code that opens a screen names no engine adapter:
Strata.screens().open(new ExchangeScreen(exchange));

Each engine adapter decides where a screen opens. An engine with screens of its own shows it as one of them, and a screen stack pushes it. The adapter's documentation says which.

Strata and its engine adapters implement this interface. Do not implement it.

  • Method Details

    • open

      default ScreenHandle open(Screen screen)
      Opens a screen in the platform's default theme, the one ThemeRef.platform() names. The same as open(screen, ThemeRef.platform()).
      Parameters:
      screen - the screen to open
      Returns:
      the handle of the new opening; its methods do nothing once the screen closes
      Throws:
      ThemeException - if the theme cannot be resolved or lacks keys the screen's tree needs, on platforms that build the screen at once
    • open

      ScreenHandle open(Screen screen, ThemeRef theme)
      Opens a screen in a theme. The screen follows the theme's packs and overrides as long as it is open.
      Parameters:
      screen - the screen to open
      theme - the theme for its components
      Returns:
      the handle of the new opening; its methods do nothing once the screen closes
      Throws:
      ThemeException - if the theme cannot be resolved or lacks keys the screen's tree needs, on platforms that build the screen at once