JDK-8102797 : Add constants to Application class for Modena and Caspian
  • Type: Sub-task
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-01-23
  • Updated: 2015-06-16
  • Resolved: 2013-01-23
Description
I propose adding two constants to Application like:

[1/22/13 4:37:05 PM] Jasper Potts: public abstract class Application {
 �� ��/**
 �� �� * Constant for user agent stylesheet for the "Caspian" theme. Caspian
 �� �� * is the theme that shipped as default in JavaFX 2.x.
 �� �� */
 �� ��public static final String CASPIAN = "CASPIAN";
 �� ��/**
 �� �� * Constant for user agent stylesheet for the "Modena" theme. Modena
 �� �� * is the default theme for JavaFX 8.x.
 �� �� */
 �� ��public static final String MODENA = "MODENA";

So that in your application you can just say:

public void start(..) {
.....
 �� �� �� �� �� �� ��setUserAgentStylesheet(MODENA);
.....
....
}
Comments
changed to /** * Constant for user agent stylesheet for the "Caspian" theme. Caspian * is the theme that shipped as default in JavaFX 2.x. */ public static final String STYLESHEET_CASPIAN = "CASPIAN"; /** * Constant for user agent stylesheet for the "Modena" theme. Modena * is the default theme for JavaFX 8.x. */ public static final String STYLESHEET_MODENA = "MODENA"; based on Jonathan's feedback that it is clearer what the constants are used for.
23-01-2013