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 TypeMethodDescriptionjavafx.scene.SceneGet current JavaFX scene of this screenRoute parameters for the current navigation, resolved from dynamic segments (${param}) — e.g.booleanReturns whether this screen's window is currently in full-screen mode.voidNavigates to the given route path within this screen's stage.voidnavigateAndCloseOthers(String path) Fecha todas as janelas spawned (inclusive a atual, se for uma spawned) e navega a stage principal para o path informado.scope()Escopo de cancelamento vinculado a esta navegação: cancelado automaticamente peloRouterBaseassim que a tela associada é destruída (antes deonDestroy()rodar).javafx.stage.StageThe JavaFXStagethis screen is currently attached to.voidsetFullScreen(boolean fullScreen) Changes this screen's window full-screen mode without exposing JavaFX stage manipulation to application code.voidspawnWindow(String path) Spawns a new window for the given route.voidspawnWindow(String path, Consumer<Exception> errorHandler) Spawns a new window for the given route.default voidToggles this screen's window between full-screen and windowed modes.voidwhenReady(RunnableThrowing callback) 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 peloRouterBaseassim que a tela associada é destruída (antes deonDestroy()rodar). Trabalho assíncrono iniciado viascope().run(...)não fica pendurado depois que o usuário navega pra outro lugar. -
whenReady
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
-
selfStage
javafx.stage.Stage selfStage()The JavaFXStagethis 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
Spawns a new window for the given route.- Parameters:
path- route identification to spawn
-
spawnWindow
-