-
Bug
-
Resolution: Fixed
-
P3
-
8
-
None
-
Windows 7 32 bits JDK8 b54
Assigning a Class Style from code using getStyleClass().add() doesn't work in FX 8 (JDK8 b54).
It seems like there is a node class cache that is not being invalidated like previus versions.
In some cases, when you set a style element (Ej. setStyle("-fx-border-width:1px 1px 0px 1px;")) on a parent node, after setting the Class Style, cache (or whatever) is invalidated and there is a style update (sometimes a partial update).
However, if you remove a class style assigned in FXML with getStyleClass().remove(...). style is removed with no problems.
With Stylesheet, issue is different.
When you load a Stylesheet for a component with pane.getStylesheets().add(...), stylesheet is applied only in the parent (pane in this case). If this parent contains another components (buttons, labels, etc...) stylesheets are not used by them since JDK8 b54.
It seems like there is a node class cache that is not being invalidated like previus versions.
In some cases, when you set a style element (Ej. setStyle("-fx-border-width:1px 1px 0px 1px;")) on a parent node, after setting the Class Style, cache (or whatever) is invalidated and there is a style update (sometimes a partial update).
However, if you remove a class style assigned in FXML with getStyleClass().remove(...). style is removed with no problems.
With Stylesheet, issue is different.
When you load a Stylesheet for a component with pane.getStylesheets().add(...), stylesheet is applied only in the parent (pane in this case). If this parent contains another components (buttons, labels, etc...) stylesheets are not used by them since JDK8 b54.