This content has been marked as final. Show 5 replies
anyone got an idea?
I don't believe such a thing exists and there are no plans from Oracle to create one.1 person found this helpful
See the comments by Richard (JavaFX project lead) and Greg (FXML creator) here:
Re: Manipulating Illustrator / Photoshop images on JavaFX 2.0 ?
Re: FxTranslator, migration from 1.3.1to 2.0
If your FXD files were created in Adobe products as an FXG format then exported to FXD using the JavaFX 1.3 production suite and you still have the original Adobe FXG source files, you could use this tool http://fxexperience.com/2011/12/fxg-to-fxml-in-javafx/ to convert them to fxml. A big If I know, but perhaps you will get lucky, otherwise you will need to do the translation by hand or create a conversion tool yourself.
thanks for your input @jsmith
Unfortunately the FXDs that I need to migrate are not graphics - they are UI definitions. It's a pitty that there's no official way to migrate them to the new FXML format.
Can somebody suggest what would be the best way to implement such a converter tool? Maybe use an existing JSON to XML converter and extend it?
1 person found this helpful
Can somebody suggest what would be the best way to implement such a converter tool?Difficult to say - I don't think there is a straightforward way to automate this process. The route I would explore, if I had to, is to let JavaFX 1.3 handle the parsing of JavaFX 1.3 code by loading the FXD documents into JavaFX 1.3, then recurse over the nodes of the added documents to write out an FXML file using an XML lib or Groovy's XML processing capabilities - that way you don't need to write an FXD parser or adapt a JSON parser. You wouldn't end up with an exact translation, but perhaps it would end up close enough that you could hand tweak or XSLT the XML output to workable FXML. But whether the effort to build such a tool would outweigh the effort of hand translating to FXML I'm not sure. You don't really want a 1:1 translation of the files as FXML and JavaFX 1.3 are differ beyond syntactic considerations (e.g. constructs such as layout panes, controls, public object properties and binding mechanisms differ in both their structure and semantics), so whatever you do, some manual post processing is going to be required.
thanks for your suggestions!