changeset 7919:4d31c9c55102

[SCENEBUILDER] Fix DTL-6842: Cleanup the code returning URL of CSS files
author yjoan
date Fri, 29 Aug 2014 16:58:06 +0200
parents 8a83d139c837
children 190eb7e2d1ff
files apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/preview/PreviewWindowController.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/EditorPlatform.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/ContentPanelController.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/WorkspaceController.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/CssInternal.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java
diffstat 6 files changed, 63 insertions(+), 144 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/preview/PreviewWindowController.java	Fri Aug 29 16:03:17 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/preview/PreviewWindowController.java	Fri Aug 29 16:58:06 2014 +0200
@@ -45,7 +45,6 @@
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.ResourceBundle;
@@ -242,7 +241,7 @@
 
                         Object sceneGraphRoot = clone.getSceneGraphRoot();
                         final List<String> themeStyleSheetStrings = new ArrayList<>();
-                        themeStyleSheetStrings.add( EditorPlatform.getThemeStylesheetURL(editorControllerTheme).toString());
+                        themeStyleSheetStrings.add( EditorPlatform.getThemeStylesheetURL(editorControllerTheme));
 
                         if (sceneGraphRoot instanceof Parent) {
                             ((Parent) sceneGraphRoot).setId(NID_PREVIEW_ROOT);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/EditorPlatform.java	Fri Aug 29 16:03:17 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/EditorPlatform.java	Fri Aug 29 16:58:06 2014 +0200
@@ -34,7 +34,6 @@
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
 import java.io.File;
 import java.io.IOException;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
@@ -96,76 +95,61 @@
         CASPIAN_EMBEDDED_QVGA_HIGH_CONTRAST
     }
 
-    private final static URL caspianThemeUrl = Deprecation.getCaspianStylesheetURL();
-    private final static URL caspianHighContrastThemeUrl = Deprecation.getCaspianHighContrastStylesheetURL();
-    private final static URL caspianEmbeddedThemeUrl = Deprecation.getCaspianEmbeddedStylesheetURL();
-    private final static URL caspianEmbeddedHighContrastThemeUrl = Deprecation.getCaspianEmbeddedHighContrastStylesheetURL();
-    private final static URL caspianEmbeddedQVGAThemeUrl = Deprecation.getCaspianEmbeddedQVGAStylesheetURL();
-    private final static URL caspianEmbeddedQVGAHighContrastThemeUrl = Deprecation.getCaspianEmbeddedQVGAHighContrastStylesheetURL();
-    private final static URL modenaThemeUrl = Deprecation.getModenaStylesheetURL();
-    private final static URL modenaTouchThemeUrl = Deprecation.getModenaTouchStylesheetURL();
-    private final static URL modenaHighContrastBlackonwhiteThemeUrl = Deprecation.getModenaHighContrastBlackonwhiteStylesheetURL();
-    private final static URL modenaHighContrastWhiteonblackThemeUrl = Deprecation.getModenaHighContrastWhiteonblackStylesheetURL();
-    private final static URL modenaHighContrastYellowonblackThemeUrl = Deprecation.getModenaHighContrastYellowonblackStylesheetURL();
-    private final static URL modenaTouchHighContrastBlackonwhiteThemeUrl = Deprecation.getModenaTouchHighContrastBlackonwhiteStylesheetURL();
-    private final static URL modenaTouchHighContrastWhiteonblackThemeUrl = Deprecation.getModenaTouchHighContrastWhiteonblackStylesheetURL();
-    private final static URL modenaTouchHighContrastYellowonblackThemeUrl = Deprecation.getModenaTouchHighContrastYellowonblackStylesheetURL();
-
     /**
-     * Returns the list of url for locating the specified stylesheet.
-     * SB uses a set of CSS files aggregating several @import statements (see DTL-6699).
+     * Returns the url string for locating the specified stylesheet.
+     * SB uses a set of CSS files aggregating several @import statements (see DTL-6799).
      *
-     * @param theme theme for which list of url should be computed
-     * @return url for locating the specified stylesheet.
+     * @param theme theme for which string should be computed
+     * @return string for locating the specified stylesheet.
      */
-    public static URL getThemeStylesheetURL(Theme theme) {
-        final URL result;
+    public static String getThemeStylesheetURL(Theme theme) {
+        final String result;
 
         switch (theme) {
             default:
                 result = null;
                 break;
             case MODENA:
-                result = modenaThemeUrl;
+                result = Deprecation.MODENA_STYLESHEET;
                 break;
             case MODENA_TOUCH:
-                result = modenaTouchThemeUrl;
+                result = Deprecation.MODENA_TOUCH_STYLESHEET;
                 break;
             case MODENA_HIGH_CONTRAST_BLACK_ON_WHITE:
-                result = modenaHighContrastBlackonwhiteThemeUrl;
+                result = Deprecation.MODENA_HIGHCONTRAST_BLACKONWHITE_STYLESHEET;
                 break;
             case MODENA_HIGH_CONTRAST_WHITE_ON_BLACK:
-                result = modenaHighContrastWhiteonblackThemeUrl;
+                result = Deprecation.MODENA_HIGHCONTRAST_WHITEONBLACK_STYLESHEET;
                 break;
             case MODENA_HIGH_CONTRAST_YELLOW_ON_BLACK:
-                result = modenaHighContrastYellowonblackThemeUrl;
+                result = Deprecation.MODENA_HIGHCONTRAST_YELLOWONBLACK_STYLESHEET;
                 break;
             case MODENA_TOUCH_HIGH_CONTRAST_BLACK_ON_WHITE:
-                result = modenaTouchHighContrastBlackonwhiteThemeUrl;
+                result = Deprecation.MODENA_TOUCH_HIGHCONTRAST_BLACKONWHITE_STYLESHEET;
                 break;
             case MODENA_TOUCH_HIGH_CONTRAST_WHITE_ON_BLACK:
-                result = modenaTouchHighContrastWhiteonblackThemeUrl;
+                result = Deprecation.MODENA_TOUCH_HIGHCONTRAST_WHITEONBLACK_STYLESHEET;
                 break;
             case MODENA_TOUCH_HIGH_CONTRAST_YELLOW_ON_BLACK:
-                result = modenaTouchHighContrastYellowonblackThemeUrl;
+                result = Deprecation.MODENA_TOUCH_HIGHCONTRAST_YELLOWONBLACK_STYLESHEET;
                 break;
             case CASPIAN:
-                result = caspianThemeUrl;
+                result = Deprecation.CASPIAN_STYLESHEET;
                 break;
             case CASPIAN_HIGH_CONTRAST:
-                result = caspianHighContrastThemeUrl;
+                result = Deprecation.CASPIAN_HIGHCONTRAST_STYLESHEET;
                 break;
             case CASPIAN_EMBEDDED:
-                result = caspianEmbeddedThemeUrl;
+                result = Deprecation.CASPIAN_EMBEDDED_STYLESHEET;
                 break;
             case CASPIAN_EMBEDDED_HIGH_CONTRAST:
-                result = caspianEmbeddedHighContrastThemeUrl;
+                result = Deprecation.CASPIAN_EMBEDDED_HIGHCONTRAST_STYLESHEET;
                 break;
             case CASPIAN_EMBEDDED_QVGA:
-                result = caspianEmbeddedQVGAThemeUrl;
+                result = Deprecation.CASPIAN_EMBEDDED_QVGA_STYLESHEET;
                 break;
             case CASPIAN_EMBEDDED_QVGA_HIGH_CONTRAST:
-                result = caspianEmbeddedQVGAHighContrastThemeUrl;
+                result = Deprecation.CASPIAN_EMBEDDED_QVGA_HIGHCONTRAST_STYLESHEET;
                 break;
         }
         
@@ -176,9 +160,9 @@
         return result;
     }
     
-    public static URL getPlatformThemeStylesheetURL() {
+    public static String getPlatformThemeStylesheetURL() {
         // Return USER_AGENT css, which is Modena for fx 8.0
-        return modenaThemeUrl;
+        return Deprecation.MODENA_STYLESHEET;
     }
     
     public static boolean isModena(Theme theme) {
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/ContentPanelController.java	Fri Aug 29 16:03:17 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/ContentPanelController.java	Fri Aug 29 16:58:06 2014 +0200
@@ -1007,7 +1007,7 @@
     private void themeDidChange() {
         if (contentGroup != null) {
             final EditorPlatform.Theme theme = getEditorController().getTheme();
-            final URL themeStyleSheet = EditorPlatform.getThemeStylesheetURL(theme);
+            final String themeStyleSheet = EditorPlatform.getThemeStylesheetURL(theme);
             workspaceController.setThemeStyleSheet(themeStyleSheet);
         }
     }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/WorkspaceController.java	Fri Aug 29 16:03:17 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/WorkspaceController.java	Fri Aug 29 16:58:06 2014 +0200
@@ -34,7 +34,6 @@
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument;
 
-import java.net.URL;
 import java.util.List;
 
 import javafx.animation.FadeTransition;
@@ -146,14 +145,14 @@
         return result;
     }
     
-    public void setThemeStyleSheet(URL themeStyleSheet) {
+    public void setThemeStyleSheet(String themeStyleSheet) {
         assert contentGroup.getParent() instanceof Group;
         final Group isolationGroup = (Group) contentGroup.getParent();
         assert isolationGroup.getStyleClass().contains("root");
         
         isolationGroup.getStylesheets().clear();
         assert themeStyleSheet != null;
-        isolationGroup.getStylesheets().add(themeStyleSheet.toString());
+        isolationGroup.getStylesheets().add(themeStyleSheet);
         isolationGroup.applyCss();
     }
     
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/CssInternal.java	Fri Aug 29 16:03:17 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/CssInternal.java	Fri Aug 29 16:58:06 2014 +0200
@@ -75,28 +75,21 @@
  */
 public class CssInternal {
 
-    private final static URL caspianThemeUrl = Deprecation.getCaspianStylesheetURL();
-    private final static URL caspianHighContrastThemeUrl = Deprecation.getCaspianHighContrastStylesheetURL();
-    private final static URL caspianEmbeddedThemeUrl = Deprecation.getCaspianEmbeddedStylesheetURL();
-    private final static URL caspianEmbeddedHighContrastThemeUrl = Deprecation.getCaspianEmbeddedHighContrastStylesheetURL();
-    private final static URL caspianEmbeddedQVGAThemeUrl = Deprecation.getCaspianEmbeddedQVGAStylesheetURL();
-    private final static URL caspianEmbeddedQVGAHighContrastThemeUrl = Deprecation.getCaspianEmbeddedQVGAHighContrastStylesheetURL();
-    private final static URL modenaThemeUrl = Deprecation.getModenaStylesheetURL();
-    private final static URL modenaTouchThemeUrl = Deprecation.getModenaTouchStylesheetURL();
-    private final static URL modenaHighContrastBlackonwhiteThemeUrl = Deprecation.getModenaHighContrastBlackonwhiteStylesheetURL();
-    private final static URL modenaHighContrastWhiteonblackThemeUrl = Deprecation.getModenaHighContrastWhiteonblackStylesheetURL();
-    private final static URL modenaHighContrastYellowonblackThemeUrl = Deprecation.getModenaHighContrastYellowonblackStylesheetURL();
-    private final static URL modenaTouchHighContrastBlackonwhiteThemeUrl = Deprecation.getModenaTouchHighContrastBlackonwhiteStylesheetURL();
-    private final static URL modenaTouchHighContrastWhiteonblackThemeUrl = Deprecation.getModenaTouchHighContrastWhiteonblackStylesheetURL();
-    private final static URL modenaTouchHighContrastYellowonblackThemeUrl = Deprecation.getModenaTouchHighContrastYellowonblackStylesheetURL();
-    private final static URL[] themeUrls = {
-        caspianThemeUrl, caspianHighContrastThemeUrl, caspianEmbeddedThemeUrl,
-        caspianEmbeddedHighContrastThemeUrl, caspianEmbeddedQVGAThemeUrl,
-        caspianEmbeddedQVGAHighContrastThemeUrl,
-        modenaThemeUrl, modenaTouchThemeUrl, modenaHighContrastBlackonwhiteThemeUrl,
-        modenaHighContrastWhiteonblackThemeUrl, modenaHighContrastYellowonblackThemeUrl,
-        modenaTouchHighContrastBlackonwhiteThemeUrl, modenaTouchHighContrastWhiteonblackThemeUrl,
-        modenaTouchHighContrastYellowonblackThemeUrl
+    private final static String[] themeUrls = {
+        Deprecation.CASPIAN_EMBEDDED_HIGHCONTRAST_STYLESHEET,
+        Deprecation.CASPIAN_EMBEDDED_QVGA_HIGHCONTRAST_STYLESHEET,
+        Deprecation.CASPIAN_EMBEDDED_QVGA_STYLESHEET,
+        Deprecation.CASPIAN_EMBEDDED_STYLESHEET,
+        Deprecation.CASPIAN_HIGHCONTRAST_STYLESHEET,
+        Deprecation.CASPIAN_STYLESHEET,
+        Deprecation.MODENA_HIGHCONTRAST_BLACKONWHITE_STYLESHEET,
+        Deprecation.MODENA_HIGHCONTRAST_WHITEONBLACK_STYLESHEET,
+        Deprecation.MODENA_HIGHCONTRAST_YELLOWONBLACK_STYLESHEET,
+        Deprecation.MODENA_STYLESHEET,
+        Deprecation.MODENA_TOUCH_HIGHCONTRAST_BLACKONWHITE_STYLESHEET,
+        Deprecation.MODENA_TOUCH_HIGHCONTRAST_WHITEONBLACK_STYLESHEET,
+        Deprecation.MODENA_TOUCH_HIGHCONTRAST_YELLOWONBLACK_STYLESHEET,
+        Deprecation.MODENA_TOUCH_STYLESHEET
     };
 
     /**
@@ -111,12 +104,12 @@
 
     public static boolean isCaspianTheme(Style style) {
         return style.getDeclaration().getRule().getStylesheet().getUrl()
-                .equals(caspianThemeUrl.toString());
+                .endsWith(Deprecation.CASPIAN_STYLESHEET);
     }
 
     public static boolean isModenaTheme(Style style) {
         return style.getDeclaration().getRule().getStylesheet().getUrl()
-                .equals(modenaThemeUrl.toString());
+                .endsWith(Deprecation.MODENA_TOUCH_STYLESHEET);
     }
 
     public static String getThemeDisplayName(Style style) {
@@ -143,8 +136,8 @@
         if (rule.getOrigin() == StyleOrigin.AUTHOR) {
             String stylePath = rule.getStylesheet().getUrl();
             assert stylePath != null;
-            for (URL themeUrl : themeUrls) {
-                if (stylePath.equals(themeUrl.toString())) {
+            for (String themeUrl : themeUrls) {
+                if (stylePath.endsWith(themeUrl)) {
                     return true;
                 }
             }
@@ -157,7 +150,7 @@
     }
 
     public static List<String> getThemeStyleClasses(Theme theme) {
-        URL themeStyleSheet = EditorPlatform.getThemeStylesheetURL(theme);
+        String themeStyleSheet = EditorPlatform.getThemeStylesheetURL(theme);
         Set<String> themeClasses = new HashSet<>();
         // For Theme css, we need to get the text css (.css) to be able to parse it.
         // (instead of the default binary format .bss)
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java	Fri Aug 29 16:03:17 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java	Fri Aug 29 16:58:06 2014 +0200
@@ -72,6 +72,21 @@
         assert false;
     }
 
+    public static String CASPIAN_STYLESHEET = "com/sun/javafx/scene/control/skin/caspian/caspian.bss"; //NOI18N
+    public static String CASPIAN_HIGHCONTRAST_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-highContrast.css"; //NOI18N
+    public static String CASPIAN_EMBEDDED_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-embedded.css"; //NOI18N
+    public static String CASPIAN_EMBEDDED_HIGHCONTRAST_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-embedded-highContrast.css"; //NOI18N
+    public static String CASPIAN_EMBEDDED_QVGA_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-embedded-qvga.css"; //NOI18N
+    public static String CASPIAN_EMBEDDED_QVGA_HIGHCONTRAST_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-embedded-qvga-highContrast.css"; //NOI18N
+    public static String MODENA_STYLESHEET = "com/sun/javafx/scene/control/skin/modena/modena.bss"; //NOI18N
+    public static String MODENA_TOUCH_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-touch.css"; //NOI18N
+    public static String MODENA_HIGHCONTRAST_BLACKONWHITE_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-highContrast-blackOnWhite.css"; //NOI18N
+    public static String MODENA_HIGHCONTRAST_WHITEONBLACK_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-highContrast-whiteOnBlack.css"; //NOI18N
+    public static String MODENA_HIGHCONTRAST_YELLOWONBLACK_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-highContrast-yellowOnBlack.css"; //NOI18N
+    public static String MODENA_TOUCH_HIGHCONTRAST_BLACKONWHITE_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-touch-highContrast-blackOnWhite.css"; //NOI18N
+    public static String MODENA_TOUCH_HIGHCONTRAST_WHITEONBLACK_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-touch-highContrast-whiteOnBlack.css"; //NOI18N
+    public static String MODENA_TOUCH_HIGHCONTRAST_YELLOWONBLACK_STYLESHEET = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-touch-highContrast-yellowOnBlack.css"; //NOI18N
+
     // Deprecated stuff in Node
 //    // RT-21247 : Promote impl_getAllParentStylesheets to public API
     public static Group createGroupWithNullParentStylesheets() {
@@ -221,84 +236,13 @@
         };
 
         result.getStyleClass().add("root"); //NOI18N
-        result.getStylesheets().add(getModenaStylesheetURL().toString());
+        result.getStylesheets().add(MODENA_STYLESHEET);
 
         return result;
     }
 
-    public static URL getCaspianStylesheetURL() {
-        final String resourceName = "com/sun/javafx/scene/control/skin/caspian/caspian.bss"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getCaspianHighContrastStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-highContrast.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getCaspianEmbeddedStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-embedded.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getCaspianEmbeddedHighContrastStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-embedded-highContrast.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getCaspianEmbeddedQVGAStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-embedded-qvga.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getCaspianEmbeddedQVGAHighContrastStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/caspian/caspian-embedded-qvga-highContrast.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getModenaStylesheetURL() {
-        final String resourceName = "com/sun/javafx/scene/control/skin/modena/modena.bss"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getModenaTouchStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-touch.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getModenaHighContrastBlackonwhiteStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-highContrast-blackOnWhite.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getModenaHighContrastWhiteonblackStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-highContrast-whiteOnBlack.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getModenaHighContrastYellowonblackStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-highContrast-yellowOnBlack.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getModenaTouchHighContrastBlackonwhiteStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-touch-highContrast-blackOnWhite.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getModenaTouchHighContrastWhiteonblackStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-touch-highContrast-whiteOnBlack.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
-    public static URL getModenaTouchHighContrastYellowonblackStylesheetURL() {
-        final String resourceName = "com/oracle/javafx/scenebuilder/kit/util/css/modena/modena-touch-highContrast-yellowOnBlack.css"; //NOI18N
-        return ClassLoader.getSystemResource(resourceName);
-    }
-
     // Returns the corresponding text css (.css) from a binary css (.bss)
-    public static URL getThemeTextStylesheet(URL binaryStylesheetUrl) {
-        String binaryCssUrlStr = binaryStylesheetUrl.toExternalForm();
+    public static URL getThemeTextStylesheet(String binaryCssUrlStr) {
         String textCssUrlStr = binaryCssUrlStr.replaceAll(".bss", ".css"); //NOI18N
         try {
             return new URL(textCssUrlStr);