Interface ScreenContextInterface

All Known Implementing Classes:
ScreenContextBase

public interface ScreenContextInterface
Screen-level context provided to each screen. Exposes navigation, route parameters, scope and window spawning. Implemented by ScreenContextBase.
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.scene.Scene
    Get current JavaFX scene of this screen
    Route parameters for the current navigation, resolved from dynamic segments (${param}) — e.g.
    boolean
    Returns whether this screen's window is currently in full-screen mode.
    void
    Navigates to the given route path within this screen's stage.
    void
    Fecha todas as janelas spawned (inclusive a atual, se for uma spawned) e navega a stage principal para o path informado.
    Escopo de cancelamento vinculado a esta navegação: cancelado automaticamente pelo RouterBase assim que a tela associada é destruída (antes de onDestroy() rodar).
    javafx.stage.Stage
    The JavaFX Stage this screen is currently attached to.
    void
    setFullScreen(boolean fullScreen)
    Changes this screen's window full-screen mode without exposing JavaFX stage manipulation to application code.
    void
    Spawns a new window for the given route.
    void
    spawnWindow(String path, Consumer<Exception> errorHandler)
    Spawns a new window for the given route.
    default void
    Toggles this screen's window between full-screen and windowed modes.
    void
    Executa o callback quando a Scene estiver pronta na Stage.
  • Method Details

    • scope

      Scope scope()
      Escopo de cancelamento vinculado a esta navegação: cancelado automaticamente pelo RouterBase assim que a tela associada é destruída (antes de onDestroy() rodar). Trabalho assíncrono iniciado via scope().run(...) não fica pendurado depois que o usuário navega pra outro lugar.
    • whenReady

      void whenReady(RunnableThrowing callback)
      Executa o callback quando a Scene estiver pronta na Stage. Cobre tanto o caso onde ela ainda não existe (aguarda) quanto o caso onde já está disponível (executa imediatamente).
    • getJavaFXScene

      javafx.scene.Scene getJavaFXScene()
      Get current JavaFX scene of this screen
      Returns:
      Scene
    • getParams

      Map<String,String> getParams()
      Route parameters for the current navigation, resolved from dynamic segments (${param}) — e.g. for path "product/${id}": { "id" = "123" }.
    • selfStage

      javafx.stage.Stage selfStage()
      The JavaFX Stage this screen is currently attached to.
    • isFullScreen

      boolean isFullScreen()
      Returns whether this screen's window is currently in full-screen mode.
    • setFullScreen

      void setFullScreen(boolean fullScreen)
      Changes this screen's window full-screen mode without exposing JavaFX stage manipulation to application code.
    • toggleFullScreen

      default void toggleFullScreen()
      Toggles this screen's window between full-screen and windowed modes.
    • spawnWindow

      void spawnWindow(String path)
      Spawns a new window for the given route.
      Parameters:
      path - route identification to spawn
    • spawnWindow

      void spawnWindow(String path, Consumer<Exception> errorHandler)
      Spawns a new window for the given route.
      Parameters:
      path - route identification to spawn
      errorHandler - callback invoked if spawning fails