Module org.snapfx

Class DockThemeStylesheetManager

java.lang.Object
org.snapfx.theme.DockThemeStylesheetManager

public final class DockThemeStylesheetManager extends Object
Resolves, stores, and applies the active SnapFX stylesheet across managed scenes.
  • Constructor Details

    • DockThemeStylesheetManager

      public DockThemeStylesheetManager()
      Creates a stylesheet manager initialized with the default built-in stylesheet.
  • Method Details

    • getStylesheetResourcePath

      public String getStylesheetResourcePath()
      Returns the current stylesheet resource path (or absolute stylesheet URL).
      Returns:
      configured stylesheet resource path or absolute URL
    • setStylesheetResourcePath

      public String setStylesheetResourcePath(String stylesheetResourcePath)
      Sets a new stylesheet resource path or URL and returns the previous resolved stylesheet URL.
      Parameters:
      stylesheetResourcePath - classpath resource path or absolute URL
      Returns:
      previously resolved stylesheet URL
    • applyToScene

      public void applyToScene(javafx.scene.Scene scene, String previousStylesheetUrl)
      Applies the active stylesheet to the given scene and removes the previous managed stylesheet URL when needed.
      Parameters:
      scene - scene to update
      previousStylesheetUrl - previously managed stylesheet URL, or null