Handling updates to the JavaFX Caspian look

Jonathan Giles jonathan.giles at oracle.com
Tue Mar 13 16:47:21 PDT 2012


Hi all,

Today I came across the RT-19713 [1] Jira issue I filed against myself 
recently. This Jira issue basically states that we should have API in 
JavaFX that allows for developers to lock down and specify a particular 
default stylesheet, and if this isn't specified by the developer, they 
will be automatically updated in future releases if we ever consider 
changing the default style sheet. We would always ship earlier style 
sheets as well, so if the preference was set, the style sheet would be 
there in the jar file.

The reason why I want this feature is that I've seen tweaked caspian 
style sheets (for example the one used in the upcoming Scene Builder 
tool) that I would one day love to be the default style sheet for JavaFX 
as it (in my opinion) is more refined. Similarly, I don't think anyone 
wants to end up in the same situation as Swing, where the default L&F is 
Metal, because moving the default to a more modern L&F would potentially 
break (or at least maim) many deployed Swing applications.

Ideally we would have had API like this from the get-go, but alas, it 
did not happen. Adding API now that by default auto-updates people is of 
course breaking a contract we have with developers, but I feel that it 
is better to break this contract now than to forever wish that we could 
provide a new style sheet and never be able to do it. I think the main 
thing is to communicate this change as loudly and from as many roof tops 
as possible. Perhaps there are others on this list that disagree and 
have different opinions. Feel free to share them.

Finally, as of now, there is no intention to ship an updated style sheet 
that would replace the default, but I'm looking ahead to future releases 
where this may be desired. Perhaps JavaFX 3.0 may include a visual 
refresh, for example. If anyone has any thoughts on this proposal, 
please reply on this thread (and preferably also leave a comment on the 
Jira issue). I don't have any proposed API for this issue, but if anyone 
has any thoughts on this, please feel free to share them also.

[1] http://javafx-jira.kenai.com/browse/RT-19713

Thanks,
Jonathan


More information about the openjfx-dev mailing list