Class ImmutableViewStylesheetProvider

java.lang.Object
dev.zemco.codegame.presentation.ImmutableViewStylesheetProvider
All Implemented Interfaces:
IViewStylesheetProvider

public class ImmutableViewStylesheetProvider extends Object implements IViewStylesheetProvider
Immutable provider for stylesheets for JavaFX views. The view to stylesheets mappings are specified during construction.
Author:
Erik Zemčík
  • Constructor Details

    • ImmutableViewStylesheetProvider

      public ImmutableViewStylesheetProvider(Map<String,List<String>> viewIdToStylesheetListMap)
      Creates an instance of ImmutableStageProvider with the given view to stylesheet mappings.
      Parameters:
      viewIdToStylesheetListMap - mappings of view ids to their respective stylesheets
      Throws:
      IllegalArgumentException - if viewIdToStyleSheetListMap is null
  • Method Details

    • getStylesheetsByViewId

      public List<String> getStylesheetsByViewId(String viewId)
      Description copied from interface: IViewStylesheetProvider
      Provides the string URLs linking to the stylesheets assigned to the requested view. These stylesheets are usable by the content of the JavaFX scene. The view is identified by the viewId parameter.
      Specified by:
      getStylesheetsByViewId in interface IViewStylesheetProvider
      Parameters:
      viewId - identification of the view
      Returns:
      unmodifiable list of stylesheets
      See Also:
      • Scene.getStylesheets()