Package dev.zemco.codegame.presentation
Class ImmutableViewStylesheetProvider
java.lang.Object
dev.zemco.codegame.presentation.ImmutableViewStylesheetProvider
- All Implemented Interfaces:
IViewStylesheetProvider
Immutable provider for stylesheets for JavaFX views.
The view to stylesheets mappings are specified during construction.
- Author:
- Erik Zemčík
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableViewStylesheetProvider(Map<String, List<String>> viewIdToStylesheetListMap) Creates an instance ofImmutableStageProviderwith the given view to stylesheet mappings. -
Method Summary
Modifier and TypeMethodDescriptiongetStylesheetsByViewId(String viewId) Provides the string URLs linking to the stylesheets assigned to the requested view.
-
Constructor Details
-
ImmutableViewStylesheetProvider
Creates an instance ofImmutableStageProviderwith the given view to stylesheet mappings.- Parameters:
viewIdToStylesheetListMap- mappings of view ids to their respective stylesheets- Throws:
IllegalArgumentException- ifviewIdToStyleSheetListMapisnull
-
-
Method Details
-
getStylesheetsByViewId
Description copied from interface:IViewStylesheetProviderProvides the string URLs linking to the stylesheets assigned to the requested view. These stylesheets are usable by the content of the JavaFXscene. The view is identified by theviewIdparameter.- Specified by:
getStylesheetsByViewIdin interfaceIViewStylesheetProvider- Parameters:
viewId- identification of the view- Returns:
- unmodifiable
listof stylesheets - See Also:
-
Scene.getStylesheets()
-