This content has been marked as final. Show 3 replies
I think that setting node properties is what fxml and java code is for, not css.
Yes but there are some cases where it would be better to set a property in pure CSS. Please think of a CheckBox which is skinned for different target platforms. A checkbox on Desktop windows contains of a rectangle and a mark. But the Checkbox (Toggle button) on iOS (iPhone, iPad) has a label "ON" / "OFF" in the background of the checkbox. So it would be good to set the text property of a node (e.g.)
Because JavaFX CSS does not support setting any node property I have to include the "ON"/"OFF" as background image...the point is: It's not scalable (no SVG).
See http://docs.oracle.com/javafx/2/api/index.html for a list of properties that can be set via css.