custom FXML builders in SceneBuilder
tbee at tbee.org
Fri Jan 3 03:12:20 PST 2014
I think there are two usages of builders:
- construct compontents / controls programatically (ending in the build() call).
- mapping of FXML attributes to node properties, because in FXML everything must be a string.
For example, CalendarTextField has no builder class in the first sense (I used withers for that), but does have a class that converts the dateFormats (list of SimpleDateFormat strings) in an fxml file to an actual list of DateFormats instances.
If you can explain to me how to do this without a builder, but also without polluting CalendarTextField with FXML aspects, then I'll change the code.
On 2014-1-3 11:44, Eric Le Ponner wrote:
> When Scene Builder 2.0 found a custom components, it instantiates it using FXMLLoader
> without making any specific builder setup. So FXMLLoader uses the default JavaFX
> builder factory.
> Since builders are deprecated, I'm not sure it make sense for SB to have dependency on them.
> Le 3 janv. 2014 à 10:55, Tom Eugelink <tbee at tbee.org> a écrit :
>> I had no problems adding the JFXtras components to SceneBuilder, but one of the controls has a custom FXML builder. It is present in the same jar, but how do I tell SceneBuilder to use it? Now when I try to load an fxml file an exception ("unable to coerse") is shown by SceneBuilder.
More information about the openjfx-dev