[REVIEW REQUEST] RT-19713 Add API to JavaFX to allow for setting preferred user agent stylesheet (original) (raw)

Jim Weaver james.weaver at oracle.com
Wed Nov 21 13:38:56 PST 2012


+1.

Thanks, Jim Weaver

On 11/21/12 4:09 PM, Jasper Potts wrote:

Hi All,

I would like to add API to Application to add the ability to set the default user agent stylesheet. So far JavaFX has had a default stylesheet of capsian.css hard coded for all applications. In 8 if we have time I would like to have a new stylesheet that you can use as alternative to caspian.css. This would also open the platform to easy use of 3rd party look and feels. public abstract class Application { …. /** * Set the default user agent stylesheet. This is used to provide default * styling for all ui controls and other nodes. Each release of JavaFX may * have a new default value for this so if you need to guarantee consistency * you will need to call this method and choose what default you would like * for your application. * * @param url The URL to the stylesheet as a String. */ public static void setDefaultUserAgentStylesheet(String url) …. ….. } This has been a much requested feature for a long time: http://javafx-jira.kenai.com/browse/RT-8054 http://javafx-jira.kenai.com/browse/RT-5753 http://javafx-jira.kenai.com/browse/RT-19713 There have been some workarounds for specific use cases and a proposed solution for a Theme class but none have solved the root problem of being able to change the default user agent stylesheet. Thanks Jasper

-- Regards, Jim Weaver Java Evangelist Oracle Corporation james.weaver at oracle.com



More information about the openjfx-dev mailing list