-
Enhancement
-
Resolution: Unresolved
-
P4
-
jfx11
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
All platforms.
A DESCRIPTION OF THE PROBLEM :
Currently a JavaFX javafx.scene.Scene allows to add the URL of a stylesheet only in its external, stringified form (via #getStylesheets().add( "..." ); ).
But in some cases URL instances hold internal state like an URLStreamHandler that is lost if the URL is converted to its stringified form. Such URL instances are for example returned from java.lang.Class#getResource if specialized class loaders are installed -- like class loaders that offer support for special jar strcutures.
The symptom is that URL#openStream on the original URL from the Classloader works, but the Scene cannot load the Stylesheet because in the conversion URL -> externalForm -> URL the URLStreamHandler was lost.
Better would be if a Stylesheet URL instance could be directly attached and used by a scene, without intermediate conversion.
All platforms.
A DESCRIPTION OF THE PROBLEM :
Currently a JavaFX javafx.scene.Scene allows to add the URL of a stylesheet only in its external, stringified form (via #getStylesheets().add( "..." ); ).
But in some cases URL instances hold internal state like an URLStreamHandler that is lost if the URL is converted to its stringified form. Such URL instances are for example returned from java.lang.Class#getResource if specialized class loaders are installed -- like class loaders that offer support for special jar strcutures.
The symptom is that URL#openStream on the original URL from the Classloader works, but the Scene cannot load the Stylesheet because in the conversion URL -> externalForm -> URL the URLStreamHandler was lost.
Better would be if a Stylesheet URL instance could be directly attached and used by a scene, without intermediate conversion.