For type Custom, Theme will protect against removal of the CSS file, degrading as gracefully as possible. If the file
becomes unavailable while the application is running, some Scenes that have not yet had the CSS installed may not be
themed. The PreviewViewer, which uses WebEngine, supports data URLs and so generally is not affected by removal of
the file; however Theme package will not attempt to URL-encode large style sheets so as to protect memory usage (see
StyleSheetFile#MAX_IN_MEMORY_CSS_LENGTH).
| Modifier and Type | Field and Description |
|---|---|
| private final StyleSheet | |
| private final FileUpdateMonitor | |
| private static final Logger | |
| private Scene | |
| private Theme | |
| private final Consumer | |
| private final Set | |
| private final WorkspacePreferences |
| Access | Constructor and Description |
|---|---|
| public | ThemeManager(WorkspacePreferences workspacePreferences, FileUpdateMonitor fileUpdateMonitor, Consumer<Runnable> updateRunner)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| pack-priv Theme | |
| public void | installCss(Scene
the scene to install the css into mainWindowScene)Installs the base css file as a stylesheet in the given scene. |
| public void | installCss(WebEngine
the web engine to install the css into webEngine)Installs the css file as a stylesheet in the given web engine. |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | updateFontStyle(Scene
is the scene, the font size should be applied to scene)Updates the font size settings of a scene. |
| private void |
| baseStyleSheet | back to summary |
|---|---|
| private final StyleSheet baseStyleSheet | |
| fileUpdateMonitor | back to summary |
|---|---|
| private final FileUpdateMonitor fileUpdateMonitor | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| mainWindowScene | back to summary |
|---|---|
| private Scene mainWindowScene | |
| theme | back to summary |
|---|---|
| private Theme theme | |
| updateRunner | back to summary |
|---|---|
| private final Consumer<Runnable> updateRunner | |
| webEngines | back to summary |
|---|---|
| private final Set<WebEngine> webEngines | |
| workspacePreferences | back to summary |
|---|---|
| private final WorkspacePreferences workspacePreferences | |
| ThemeManager | back to summary |
|---|---|
| public ThemeManager(WorkspacePreferences workspacePreferences, FileUpdateMonitor fileUpdateMonitor, Consumer<Runnable> updateRunner) | |
| additionalCssLiveUpdate | back to summary |
|---|---|
| private void additionalCssLiveUpdate() | |
| addStylesheetToWatchlist | back to summary |
|---|---|
| private void addStylesheetToWatchlist(StyleSheet styleSheet, FileUpdateListener updateMethod) | |
| baseCssLiveUpdate | back to summary |
|---|---|
| private void baseCssLiveUpdate() | |
| getActiveTheme | back to summary |
|---|---|
pack-priv Theme getActiveTheme()
| |
| installCss | back to summary |
|---|---|
| public void installCss(Scene mainWindowScene) Installs the base css file as a stylesheet in the given scene. Changes in the css file lead to a redraw of the scene using the new css file.
| |
| installCss | back to summary |
|---|---|
| public void installCss(WebEngine webEngine) Installs the css file as a stylesheet in the given web engine. Changes in the css file lead to a redraw of the web engine using the new css file.
| |
| removeStylesheetFromWatchList | back to summary |
|---|---|
| private void removeStylesheetFromWatchList(StyleSheet styleSheet) | |
| updateAdditionalCss | back to summary |
|---|---|
| private void updateAdditionalCss() | |
| updateBaseCss | back to summary |
|---|---|
| private void updateBaseCss() | |
| updateFontSettings | back to summary |
|---|---|
| private void updateFontSettings() | |
| updateFontStyle | back to summary |
|---|---|
| public void updateFontStyle(Scene scene) Updates the font size settings of a scene. This method needs to be called from every custom dialog constructor, since javafx overwrites the style if applied before showing the dialog
| |
| updateThemeSettings | back to summary |
|---|---|
| private void updateThemeSettings() | |