Copy constructors
Scott Palmer
swpalmer at gmail.com
Mon Sep 10 10:47:43 PDT 2012
On 2012-09-10, at 1:28 PM, Greg Brown <greg.x.brown at oracle.com> wrote:
>
> Why not just partition the template contents into a separate FXML file and re-load it each time you need a new instance?
>
This brings up a question that I recently was pondering…
The FXML loader only takes a URL. If you have a resource that you may load multiple times, how efficient is it? I have used a XSLT to convert SVG into FXML so I can get scalable icons in my application. There are two concern:
1) If I choose to convert from SVG to FXML at runtime I need to make a temporary file for the FXML loader as it doesn't take a DOM or a String as a source.
2) The exact same component hierarchy is being parsed over and over (these icons may appear many many times in the GUI) - It might make sense for there to be an intermediate form that new copies of the FXML node hierarchy could be created from.
Regards,
Scott
More information about the openjfx-dev
mailing list