Is it possible to use the javafx.scene.effect.Reflection in CSS for a FXML file?
And something more general (I haven't found any answer for that yet): Can I do everthing with FXML and CSS that is available on the Java API (using JavaFX 2.2)?
Is it possible to use the javafx.scene.effect.Reflection in CSS for a FXML file?
And something more general (I haven't found any answer for that yet): Can I do everthing with FXML and CSS that is available on the Java API (using JavaFX 2.2)?
Not for JavaFX 2.2 - only dropshadow and innershadow effects can be set via CSS. Future JavaFX versions will probably add the ability to set more effects via CSS.
For now if you want an effect like that in combination with FXML, then you can use a Controller or define the effect in FXML without using CSS.
For example:
To visually design and define your FXML based effects, use SceneBuilder, click on your Node, go to the Properties Pane and select an effect to customize from the Effect drop down box.
You will still need to write some non-fxml embedded code to launch the app and load up your fxml.
If you use FXML's scripting feature you could do most of what can be done on the Java API. For ease of maintenance, I would however recommend using an FXML Controller or hosting script code external from your fxml files rather than embedding it in the fxml.