DervaFX Wiki
Theming
DervaFX currently ships with a single built-in stylesheet: /com/princeofcookies/dervafx/dervafx-dark.css
Apply the Current Theme
Scene scene = new Scene(host, 900, 600);
DervaFX.applyTheme(scene);Select the Built-In Theme
DervaFX.setTheme(DervaTheme.dark());Use a Custom Theme Resource
DervaTheme custom = DervaTheme.of("custom")
.stylesheetResource("/com/example/my-theme.css");
DervaFX.setTheme(custom); - Themes are scene-level stylesheet attachments.
DervaThemeManagertracks scenes and reapplies the current stylesheet when the theme changes.- If a stylesheet resource cannot be found, DervaFX throws an
IllegalStateException.