FX Experience Has Gone Read-Only

I've been maintaining FX Experience for a really long time now, and I love hearing from people who enjoy my weekly links roundup. One thing I've noticed recently is that maintaining two sites (FX Experience and JonathanGiles.net) takes more time than ideal, and splits the audience up. Therefore, FX Experience will become read-only for new blog posts, but weekly posts will continue to be published on JonathanGiles.net. If you follow @FXExperience on Twitter, I suggest you also follow @JonathanGiles. This is not the end - just a consolidation of my online presence to make my life a little easier!

tl;dr: Follow me on Twitter and check for the latest news on JonathanGiles.net.

When Eileen and I were working on our session for JavaOne on Designer-Developer workflow we needed a way of converting some vector graphics from Adobe Illustrator into JavaFX. So I tried the FXG to JavaFX converter I found on the web and did not have much luck as what Eileen and draw was pretty advanced. So I thought well FXG is a XML file and FXML is a XML file and as I used to do XML->XML conversion all the time for a previous job using XSLT. I thought how hard can be be to write a converter, well about 4 hours later and some dusting off of The XSLT book here is what I came up with:


I put a simple JavaFX UI around the XSLT conversion. There is not much code to the XSL file about 100 lines. It doesn’t support anywhere near all of the FXG file format and in some places it approximates the conversions rather than being exact. Even with its limitations its still very useful for quickly taking vector graphics into JavaFX. I think it would be simple to do exactly the same thing for SVG to FXML conversion, hopefully one of you will take this on and create a XSL file for that.

You can download the Netbeans project for this here:
FXGtoFXML.zip

The original graphic Eileen asked me to convert in Illustrator looks like:

And when converted to FXML in JavaFX it looks like:

Its not perfect but I think its not a bad quality of conversion for a couple hours work.