Package com.digitizer.ui
Class ThemeManager
java.lang.Object
com.digitizer.ui.ThemeManager
Manages theme selection and application for the Graph Digitizer application.
Themes are represented as inline CSS styles applied to the application's root
node. The setScene(javafx.scene.Scene) method must be called to
register the scene so themes can be applied. The manager persists
the currently selected theme to a simple properties file in the user's
home directory so the preference is remembered across restarts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanapplyTheme(String themeName) Applies a theme by name using CSS styling.Gets all available themes.static StringGets the current theme colors as a style string.static voidsetScene(javafx.scene.Scene scene) Sets the current scene for theme application.
-
Constructor Details
-
ThemeManager
public ThemeManager()
-
-
Method Details
-
setScene
public static void setScene(javafx.scene.Scene scene) Sets the current scene for theme application.- Parameters:
scene- the JavaFX scene to apply themes to
-
getAvailableThemes
Gets all available themes.- Returns:
- list of available themes sorted alphabetically
-
applyTheme
Applies a theme by name using CSS styling.- Parameters:
themeName- the name of the theme to apply- Returns:
trueif theme was successfully applied,falseotherwise
-
getCurrentThemeStyle
Gets the current theme colors as a style string.- Returns:
- the CSS style string of the current theme
-