custom FXML builders in SceneBuilder
Tom Eugelink
tbee at tbee.org
Tue Jan 21 02:00:32 PST 2014
Hi Eric,
Any chance you had time to look into this?
Tom
On 2014-1-3 12:19, Eric Le Ponner wrote:
> I will look at that and come back to you middle of next week.
>
> Eric
>
> Le 3 janv. 2014 à 12:12, Tom Eugelink <tbee at tbee.org> a écrit :
>
>> 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.
>>
>> https://github.com/JFXtras/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/fxml/CalendarTextFieldBuilder.java
>>
>> 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.
>>
>> Tom
>>
>>
>>
>> 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.
>>>
>>> Eric
>>>
>>>
>>> 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.
>>>>
>>>> Tom
>>>>
>>>>
>>
More information about the openjfx-dev
mailing list