Class ThemeManager

java.lang.Object
com.digitizer.ui.ThemeManager

public class ThemeManager extends Object
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 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

      public static List<String> getAvailableThemes()
      Gets all available themes.
      Returns:
      list of available themes sorted alphabetically
    • applyTheme

      public static boolean applyTheme(String themeName)
      Applies a theme by name using CSS styling.
      Parameters:
      themeName - the name of the theme to apply
      Returns:
      true if theme was successfully applied, false otherwise
    • getCurrentThemeStyle

      public static String getCurrentThemeStyle()
      Gets the current theme colors as a style string.
      Returns:
      the CSS style string of the current theme