Couldn't find any examples on this. How do I define constants in an FXML file?
For example (where CONTENT_SPACING
is the constant I want to create):
<VBox fx:controller="myapp.Controller" xmlns:fx="http://javafx.com/fxml" alignment="center" spacing="20">
<fx:define>
<Double fx:id="CONTENT_SPACING" fx:value="200"/>
</fx:define>
<VBox fx:id="content" spacing="$CONTENT_SPACING">
<!-- My window contents would go here -->
</VBox>
</VBox>
My code would benefit in readability if this was possible. Thanks!