Is there any source code for the JavaFX SceneBuilder

Daniel Fuchs daniel.fuchs at oracle.com
Tue Oct 9 09:16:58 PDT 2012


Hi Werner,

Yes - being able to specify the classpath as parameter when opening
a file is definitely a possibility - although the various IDE
would then need a special plugin for making use of that - simply
relying on file association would not make it possible to
pass that additional parameter - would it?

Classpath relative URL for the resource bundle file would be
a possibility - but I think in most cases you will want to
point to real file - so that SceneBuilder immediately picks
up the changes when you add new keys.

If Scene Builder points to the file in the classpath, then you
will have to rebuild & force scenebuilder to refresh its
classloader (using "Resolve Unknown Types... + Apply) before
you can see the changes in Scene Builder window.

Also you won't be able to use the file chooser to select the
.properties file that SB should use to resolve the keys.
So I'm not sure that using a Classpath relative URL in that
case will buy you much.

BTW - I was wondering whether being able to define a 'default'
classpath in the preferences (i.e. a classpath that would be
used to load any FXML file) would be a good idea?

This way - if you have some custom component library that you
always use - you could add it once in the default classpath,
and you wouldn't have to add it to any specific FXML file
any longer... And since it would be in the tool preferences,
you would be able to specify it using an absolute path - and
you wouldn't need to use any PI for that...

best regards,

-- daniel

On 10/9/12 5:26 PM, openjfx-dev-request at openjdk.java.net wrote:
> Message: 1
> Date: Tue, 9 Oct 2012 16:46:36 +0200
> From: Werner Lehmann<lehmann at media-interactive.de>
> Subject: Re: Is there any source code for the JavaFX SceneBuilder
> To:openjfx-dev at openjdk.java.net
> Message-ID:<507438CC.3010607 at media-interactive.de>
> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
>
> Daniel,
>
> thanks for the explanation. I wasn't aware that the classpath could be
> set with PI's in FXML.
>
> In my opinion this could be used as a workaround for now but does not
> really replace full IDE integration - at least not in a way how I would
> envision it. The relative paths are a problem when it comes to
> refactoring, and especially when you want to reuse the same lines in
> different FXMLs: copy & paste of those PI's requires me to think about
> how many ../../ I'd need, depending on the package of the FXML at hand.
> And I don't even want to use the DRY pattern...
>
> Usually the IDE manages the classpath for me, it would be redundant to
> add that to the FXML. I think this is similar to imports in a plain Java
> file: you say what you want but not where to find it. This information
> is provided separately. Perhaps via command line "-cp" parameter, etc.
> Furthermore, I believe it would be more practical to specify the
> resource bundle relative to the classpath as with any other control import.
>
> Maybe this is something intended for FX8? The roadmap mentions "enhanced
> Java IDE integration" but does not provide many details. This would be a
> pity for me because I'll be tied to JRE 6/7 for a quite a while longer
> and could not use this (if necessary we might be able to use JRE8 on
> development machines only but that would be less desirable).
>
> Rgds
> Werner



More information about the openjfx-dev mailing list