groostav
02/24/2017, 9:06 PM<VBox>
<CheckBox>
<VBox.margin>
<Insets bottom=1.0 top=1.0 left=1.0 right=1.0/>
</VBox.margin>
</CheckBox>
<VBox>
because of the very happy coincidence that static extension properties match the beans naming convention, this means that with a relatively simple extension function:
object VBoxExtensions {
object margin {
@JvmStatic var FXNode.uniform: Double
get() = TODO()
set(value) = TODO()
}
}
we can then write, in FXML:
<VBox>
<CheckBox VBoxExtensions.margin.uniform="1.0"/>
<VBox>
So I've done this for a couple things and put the results here:
https://gist.github.com/Groostav/78a3ec36bd9b2af49cdc3f6a015ed87c
Does anybody care to show me how I might go about using properties to remove even more of the boiler-plate?