-
Bug
-
Resolution: Fixed
-
P3
-
fx2.1, 7u6
-
javafx-sdk2.2.0-beta-b06
<URI> section of cssref.html has the following problems:
1. It suggests to use address without quotes (see screenshot) but that results in the following exceptions when invoked using setStyle method
WARNING: com.sun.javafx.css.parser.CSSParser term Unexpected token ':' at ?[1,32]
WARNING: com.sun.javafx.css.parser.CSSParser term Unexpected token ':' at ?[1,32]
WARNING: com.sun.javafx.css.parser.CSSParser reportException Please report java.lang.NullPointerException at:
com.sun.javafx.css.parser.CSSParser.term(Unknown Source)
com.sun.javafx.css.parser.CSSParser.expr(Unknown Source)
com.sun.javafx.css.parser.CSSParser.declaration(Unknown Source)
com.sun.javafx.css.parser.CSSParser.declarations(Unknown Source)
com.sun.javafx.css.parser.CSSParser.parseStyle(Unknown Source)
2. It doesn't specify what is the relative location in case of setStyle() usage. My experiments show that it is relative to the classes root (Not the particular class package which one may expect).
3. It doesn't specify what is the root (if you start your URI with "/" symbol). For example, when url('img/JavaFX.png') works url('/img/JavaFX.png') doesn't work.
1. It suggests to use address without quotes (see screenshot) but that results in the following exceptions when invoked using setStyle method
WARNING: com.sun.javafx.css.parser.CSSParser term Unexpected token ':' at ?[1,32]
WARNING: com.sun.javafx.css.parser.CSSParser term Unexpected token ':' at ?[1,32]
WARNING: com.sun.javafx.css.parser.CSSParser reportException Please report java.lang.NullPointerException at:
com.sun.javafx.css.parser.CSSParser.term(Unknown Source)
com.sun.javafx.css.parser.CSSParser.expr(Unknown Source)
com.sun.javafx.css.parser.CSSParser.declaration(Unknown Source)
com.sun.javafx.css.parser.CSSParser.declarations(Unknown Source)
com.sun.javafx.css.parser.CSSParser.parseStyle(Unknown Source)
2. It doesn't specify what is the relative location in case of setStyle() usage. My experiments show that it is relative to the classes root (Not the particular class package which one may expect).
3. It doesn't specify what is the root (if you start your URI with "/" symbol). For example, when url('img/JavaFX.png') works url('/img/JavaFX.png') doesn't work.
- blocks
-
JDK-8117289 CSS: update cssref for 8.0
- Resolved
-
JDK-8116545 CSS: update cssref for 2.2
- Resolved
- relates to
-
JDK-8095405 Scene.getStylesheets() javadoc is not specific enough on relative paths and accessible urls
- Closed