Copy constructors

Scott Palmer swpalmer at gmail.com
Mon Sep 10 12:10:21 PDT 2012


On 2012-09-10, at 2:37 PM, Tom Schindl <tom.schindl at bestsolution.at> wrote:

> So why are you not using the instance methods? BTW do you know about my
> SVG to FXML converter [1]?
> 
> It is not based on XSLT but there are many many hard things to tackle
> with XSLT (e.g. if the SVG contains an image) which are solved by it and
> I agree with Greg why do you process the SVG inside your application
> instead of running the conversion at build time.

I am aware of your converter, so is the guy that did the XSLT  :-) 
http://jayskills.com/blog/2012/06/03/svg-to-fxml-using-netbeans/

The XSLT version is simpler for my purposes and handles what I need.  Images are never going to be found in the stuff I'm doing, since the whole point is for getting a scalable UI and images basically ruin that.

See my response to Greg.  I don't currently process SVG at runtime.  I just think it makes the API more generic if that case is supported better.  I don't see why the current FXMLLoader should be limited the way it currently is.

> 
> Anyways a deep copy of an Node-Graph is something that has to be
> provided by JavaAPI itself, its IMHO nothing the FXML tool has to deal with.
> 

Yes, I consider that as well… What parts don't you copy?  Do you also copy any actions and listeners that are attached in the node hierarchy? What about the userData? What about the IDs of the nodes? They will need to be unique if you are going to use the copy in the same Scene. Changing the Ids can break your CSS… there are many points to consider when doing this using either approach.


> Tom
> 
> [1]http://tomsondev.bestsolution.at/2012/08/22/svg-to-fxml-converter-as-commandline-util/
> 



Cheers,

Scott




More information about the openjfx-dev mailing list