public class Router
extends java.lang.Object
| Constructor and Description |
|---|
Router(ViewLoader viewLoader,
javafx.stage.Stage primaryStage) |
| Modifier and Type | Method and Description |
|---|---|
void |
navigateTo(java.lang.String viewPath,
java.lang.Object... args)
Loads the given view using
ViewLoader.loadView(String, Object[]) then
sets the loaded views as the root scene of the stage that is
handled by this router.This method also centers the stage on the screen. |
public Router(ViewLoader viewLoader, javafx.stage.Stage primaryStage)
viewLoader - the loader to use to load viewsprimaryStage - the stage to change Scene of when navigatingpublic void navigateTo(java.lang.String viewPath,
java.lang.Object... args)
ViewLoader.loadView(String, Object[]) then
sets the loaded views as the root scene of the stage that is
handled by this router.viewPath - the view to navigate toargs - the arguments to pass to the view