Geertjan's Blog

  • September 20, 2011


Geertjan Wielenga
Product Manager
The dream scenario of convert-compile-create has been realized, i.e., you're now able to convert an FXG file to Java, compile it, and then -- without any tweaking of any kind -- immediately use the generated component in the creation of your Java user interface. E.g., just drag the generated Java component directly into a Swing container in Matisse.

And, you're now also able to generate a NetBeans TopComponent straight from your FXG file. The generated TopComponent will be annotated such that you can immediately deploy it, again without any tweaking of any kind, and you'll then have a new window in your NetBeans Platform application containing your converted FXG image.

This is what you'll see now when you right-click an FXG file:

One thing that needs to be done is that an HTML file should be generated together with the HTML 5 Canvas component, i.e., the last item on the list above.

Within the context of a Visual Library scene, this is how you'd integrate a converted FXG Java component, i.e., just like any other Swing component, via the ComponentWidget wrapper provided by the Visual Library:

setLayout(new BorderLayout());       
Scene s = new Scene();
LayerWidget lw = new LayerWidget(s);
ComponentWidget cw = new ComponentWidget(s, new MyConvertedFXGComponent());
add(s.createView(), BorderLayout.CENTER);

Click here to get to the page where the above plugin can be downloaded.

Join the discussion

Comments ( 5 )
  • Paul D Tuesday, September 20, 2011

    Hello Geertjan,

    Many thanks for creating this very valuable plugin. I tried it and it works OK. However when I converted to the HTML5 canvas component, Adobe2Java didn't create the HTML wrapper. Should it have done? The created JavaScript works OK. I will perform some more canvas component tests and report back.

    Kind regards

    Paul D

  • Geertjan Tuesday, September 20, 2011

    Thanks for the comment and thanks also for using the Adobe2Java plugin. Yes, the HTML wrapper isn't created yet. That's the next thing I'm working on. If you have some proposals for how that wrapper should look or any other feedback or templates that should be incorporated please do write to me at geertjan dot wielenga at oracle dot com.

  • Geertjan Wednesday, September 21, 2011

    The HTML wrapper is now created together with the HTML 5 Canvas component in 1.4 of the plugin.

  • Burabari Thursday, September 22, 2011

    Man, your a hero! I've been dreaming of such a scenario for some time now. Once I have some free time I'll port a little quiz app I did using JavaFX 1.3 & Adobe Illustrator, using this plug in, to JavaFX 2.0 send a link here once I'm done.

  • Geertjan Thursday, September 22, 2011

    Burabari, that's great to hear. Feel free to spread the word about this plugin.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha