A solution to the final classes problem

Werner Lehmann lehmann at media-interactive.de
Tue Sep 4 02:31:12 PDT 2012


Hi,

On 04.09.2012 09:11, Randahl Fink Isaksen wrote:
> Wonderful. I have created the first Jira issue here:
>
> http://javafx-jira.kenai.com/browse/RT-24692

...about makeing FileChooser non-final. Just for the record: your 
usecase seems to be FileChooser customization in the constructor (a 
constructor you want to override). An alternative to this could be a 
factory method:

public static FileChooser createMyFileChooser()
{
   FC fc = new FC
   fc.setThis
   fc.setThat
   return fc
}


Something similar would work in FXML with a builder class. If necessary 
it could use a map and thus avoid having to delegate each and every 
FileChooser property.

Werner


More information about the openjfx-dev mailing list