Adobe2Java

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);
s.addChild(lw);
ComponentWidget cw = new ComponentWidget(s, new MyConvertedFXGComponent());
cw.getActions().addAction(ActionFactory.createMoveAction());
lw.addChild(cw);
add(s.createView(), BorderLayout.CENTER);

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

Comments:

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

Posted by Paul D on September 20, 2011 at 04:45 AM PDT #

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.

Posted by Geertjan on September 20, 2011 at 05:34 AM PDT #

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

Posted by Geertjan on September 21, 2011 at 01:43 AM PDT #

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.

Posted by Burabari on September 21, 2011 at 11:40 PM PDT #

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

Posted by Geertjan on September 22, 2011 at 12:09 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
24
25
26
27
28
29
30
   
       
Today