java.lang.Object
org.snapfx.theme.DockThemeStylesheetManager
Resolves, stores, and applies the active SnapFX stylesheet across managed scenes.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a stylesheet manager initialized with the default built-in stylesheet. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToScene(javafx.scene.Scene scene, String previousStylesheetUrl) Applies the active stylesheet to the given scene and removes the previous managed stylesheet URL when needed.Returns the current stylesheet resource path (or absolute stylesheet URL).setStylesheetResourcePath(String stylesheetResourcePath) Sets a new stylesheet resource path or URL and returns the previous resolved stylesheet URL.
-
Constructor Details
-
DockThemeStylesheetManager
public DockThemeStylesheetManager()Creates a stylesheet manager initialized with the default built-in stylesheet.
-
-
Method Details
-
getStylesheetResourcePath
Returns the current stylesheet resource path (or absolute stylesheet URL).- Returns:
- configured stylesheet resource path or absolute URL
-
setStylesheetResourcePath
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
Applies the active stylesheet to the given scene and removes the previous managed stylesheet URL when needed.- Parameters:
scene- scene to updatepreviousStylesheetUrl- previously managed stylesheet URL, ornull
-