So I couldn’t resist – and just for Chris Aniszczyk
– another blog post on this topic. So I wrapped my head around this builder stuff of xtend and with the sources provided by Sven at github I managed to write a small builder for JavaFX.
and this an resulting example code:

Now the problem is that make a builder for all FXClasses one uses is not really a practical thing but the nice thing is that most of them are Beans so I added a builder method that accepts a class as the first parameter and uses reflection to create an instance.
and even autocompleteing still works in this case:

I pushed the sources to my github repo. Maybe there’s a better solution to the reflection workaround I used but currently this looks quite good.

April 11, 2012 




Trackbacks/Pingbacks
[...] 29, 2012 by Tom Schindl 0 Comments So I’ve already blogged (here and here) about the prefect match between JavaFX and [...]