Package dev.zemco.codegame.presentation
Class SimpleViewIdNavigator
java.lang.Object
dev.zemco.codegame.presentation.SimpleViewIdNavigator
- All Implemented Interfaces:
INavigator
Simple implementation of navigation which treats requested navigation routes as view ids.
The navigation is performed by switching the root of a scene of the primary stage of the application.
- Author:
- Erik Zemčík
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleViewIdNavigator(IStageProvider stageProvider, IViewProvider viewProvider) Creates an instance ofSimpleViewIdNavigatorready for navigation. -
Method Summary
Modifier and TypeMethodDescriptionvoidnavigateTo(String route) Switches the view of the primary stage to the view id specified by therouteparameter.
-
Constructor Details
-
SimpleViewIdNavigator
Creates an instance ofSimpleViewIdNavigatorready for navigation.- Parameters:
stageProvider- source of the primary stage of the applicationviewProvider- source of the navigation destination views of the application- Throws:
IllegalArgumentException- ifstageProviderisnullor ifviewProviderisnull
-
-
Method Details