Copy constructors
Tom Schindl
tom.schindl at bestsolution.at
Mon Sep 10 13:27:59 PDT 2012
Am 10.09.12 21:52, schrieb Scott Palmer:
>
> On 2012-09-10, at 3:25 PM, Greg Brown <greg.x.brown at oracle.com> wrote:
>
>>> 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.
>>
>> I'm sorry - I don't understand what limitation you are referring to.
>>
>> Keep in mind that FXMLLoader's sole purpose is loading FXML. It doesn't know about (and thus can't be optimized for loading) any other data format such as SVG. As I suggested earlier - if you want to efficiently load SVG, use an SVG-specific loader.
>
> I'm referring to the way it accepts the FXML input only via a URL and not any other form. Ultimately all it wants is XML data and so I think it would be reasonable to provide an interface that accepts data in a more general form. If it could take an InputStream for example, then FXML that was machine generated wouldn't need to go to an intermediate file in order to load.
>
> This isn't specific to SVG to FXML conversion, but that is a good example case. I don't have an SVG loader for JavaFX, and didn't find anything with a Google search, but I do know of two SVG to FXML convertors:
>
> http://tomsondev.bestsolution.at/2012/01/16/svg-for-fxml-conversion/
The reason I'd advise against doing this at runtime is that parsing and
converting SVG to FXML is not as simple as it might look like.
And like Greg and I already replied to your there is an API that accepts
an InputStream but for that you'd need to create an instance of
FXMLLoader instead of using the static methods.
Tom
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1 A-6020 innsbruck fax ++43 512 935833
http://www.BestSolution.at phone ++43 512 935834
More information about the openjfx-dev
mailing list