Re: custom FXML builders in SceneBuilder
Hi Tom, Sorry, I was a bit optimistic and found no time to look at it. I'll give a try this week. Eric Le 21 janv. 2014 à 11:00, Tom Eugelink a écrit : > > 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 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 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 > > >>> > >
Re: custom FXML builders in SceneBuilder
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 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 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
Re: custom FXML builders in SceneBuilder
IIRC we agreed while talking about the annotation replacement for builders that we'll later add a possibility to set a converter on properties through annotations - back then we only talked about constructors but this could be expanded to any property. Tom On 03.01.14 12:12, Tom Eugelink wrote: > > 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 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 >>> >>> > >
Re: custom FXML builders in SceneBuilder
I will look at that and come back to you middle of next week. Eric Le 3 janv. 2014 à 12:12, Tom Eugelink 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 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 >>> >>> > >
Re: custom FXML builders in SceneBuilder
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 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
Re: custom FXML builders in SceneBuilder
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 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 > >
custom FXML builders in SceneBuilder
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