Class StylesheetTools

  • public class StylesheetTools
    extends Object
    • Method Detail

      • init

        public static void init​(URLStreamHandlerFactory userURLStreamHandlerFactory)
        Initialize encrypted resource processing Since URL.setURLStreamHandlerFactory only allows to be called at most once in a given Java Virtual Machine and we are doing it to handle our compressed resources, we need to provide an ability for user to add a custom handler
        userURLStreamHandlerFactory - custom URLStreamHandlerFactory
      • buildResourceName

        public static String buildResourceName​(String stylesheetPrefix,
                                               String newStylesheetName)
      • replaceStylesheet

        public static void replaceStylesheet​(Scene scene,
                                             String stylesheetPrefix,
                                             String newStylesheetName)
      • addStylesheet

        public static void addStylesheet​(Scene scene,
                                         String stylesheetName)
      • asResource

        public static String asResource​(String stylesheetName)
      • asResourceStream

        public static InputStream asResourceStream​(String stylesheetName)
      • process

        public static byte[] process​(byte[] src)