For a custom stylesheet, we will protect against removal of the CSS file, degrading as
gracefully as possible: the stylesheet is embedded as a data: URL, so scenes keep their
theme if the file becomes unavailable while the application is running. Large style sheets
are not URL-encoded to protect memory usage
(see StyleSheetFile#MAX_IN_MEMORY_CSS_LENGTH).
| Modifier and Type | Field and Description |
|---|---|
| private final FileUpdateListener | |
| private ThemeColorScheme | |
| private @Nullable FileUpdateListener | |
| private @Nullable StyleSheet | |
| public static Map | |
| private final FileUpdateMonitor | |
| private static final String | |
| private final Object | fontSizeFollowsRootKey
Marks a scene whose root this manager already follows for the font size. |
| public static final StyleSheet | |
| private static final Logger | |
| private @Nullable FileUpdateListener | |
| private final ChangeListener | |
| private ThemePreset | |
| private @Nullable FileUpdateListener | |
| private final WorkspacePreferences |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | addStylesheetToWatchlist(StyleSheet styleSheet, FileUpdateListener updateMethod)
Adds a stylesheet to the live-reload watch list only when it has a real filesystem path. |
| private void | |
| private void | |
| pack-priv @Nullable StyleSheet | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | |
| private void | |
| private void | |
| private void | |
| private void |
| baseCssLiveUpdate | back to summary |
|---|---|
| private final FileUpdateListener baseCssLiveUpdate | |
| colorScheme | back to summary |
|---|---|
| private ThemeColorScheme colorScheme | |
| customCssLiveUpdate | back to summary |
|---|---|
| private @Nullable FileUpdateListener customCssLiveUpdate | |
| customTheme | back to summary |
|---|---|
| private @Nullable StyleSheet customTheme | |
| downloadIconTitleMap | back to summary |
|---|---|
| public static Map<String, Node> downloadIconTitleMap | |
| fileUpdateMonitor | back to summary |
|---|---|
| private final FileUpdateMonitor fileUpdateMonitor | |
| FONT_SIZE_STYLE_CLASS_PREFIX | back to summary |
|---|---|
| private static final String FONT_SIZE_STYLE_CLASS_PREFIX | |
| fontSizeFollowsRootKey | back to summary |
|---|---|
| private final Object fontSizeFollowsRootKey Marks a scene whose root this manager already follows for the font size. A window re-enters
| |
| JABREF_BASE_STYLE_SHEET | back to summary |
|---|---|
| public static final StyleSheet JABREF_BASE_STYLE_SHEET | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| parentCssLiveUpdate | back to summary |
|---|---|
| private @Nullable FileUpdateListener parentCssLiveUpdate | |
| sceneChangeListener | back to summary |
|---|---|
| private final ChangeListener<Scene> sceneChangeListener | |
| theme | back to summary |
|---|---|
| private ThemePreset theme | |
| themeCssLiveUpdate | back to summary |
|---|---|
| private @Nullable FileUpdateListener themeCssLiveUpdate | |
| workspacePreferences | back to summary |
|---|---|
| private final WorkspacePreferences workspacePreferences | |
| ThemeManager | back to summary |
|---|---|
| public ThemeManager(WorkspacePreferences workspacePreferences, FileUpdateMonitor fileUpdateMonitor) | |
| addStylesheetToWatchlist | back to summary |
|---|---|
| private void addStylesheetToWatchlist(StyleSheet styleSheet, FileUpdateListener updateMethod) Adds a stylesheet to the live-reload watch list only when it has a real filesystem path. Classpath resources cannot be watched. | |
| addThemeStylesheetToWatchlist | back to summary |
|---|---|
| private void addThemeStylesheetToWatchlist(ThemePreset theme) | |
| cssLiveUpdate | back to summary |
|---|---|
| private void cssLiveUpdate(StyleSheet styleSheet) | |
| getCustomTheme | back to summary |
|---|---|
pack-priv @Nullable StyleSheet getCustomTheme()
| |
| initializeWindowThemeUpdater | back to summary |
|---|---|
| private void initializeWindowThemeUpdater() | |
| registerScene | back to summary |
|---|---|
| private void registerScene(Scene scene) | |
| removeStylesheetFromWatchList | back to summary |
|---|---|
| private void removeStylesheetFromWatchList(StyleSheet styleSheet, FileUpdateListener updateMethod) | |
| removeThemeStylesheetsFromWatchList | back to summary |
|---|---|
| private void removeThemeStylesheetsFromWatchList(ThemePreset theme) | |
| updateColorSchemeOnAllScenes | back to summary |
|---|---|
| private void updateColorSchemeOnAllScenes() | |
| updateColorSchemeOnScene | back to summary |
|---|---|
| private void updateColorSchemeOnScene(Scene scene) | |
| updateCssOnAllScenes | back to summary |
|---|---|
| private void updateCssOnAllScenes() | |
| updateCssOnScene | back to summary |
|---|---|
| public void updateCssOnScene(Scene scene) Installs the CSS on the given scene. The theme stylesheet comes first, the user's custom stylesheet on top of it, and the base stylesheet last -- the base sheet only maps JabRef's own selectors onto the color tokens the theme defines, so it has to win over both. A theme with a parent declares only the tokens it changes, so the parent's stylesheet goes beneath it to supply the rest. | |
| updateFontOnAllScenes | back to summary |
|---|---|
| private void updateFontOnAllScenes() | |
| updateFontSettings | back to summary |
|---|---|
| private void updateFontSettings() | |
| updateFontStyleForScene | back to summary |
|---|---|
| private void updateFontStyleForScene(Scene scene) | |
| updateThemeSettings | back to summary |
|---|---|
| private void updateThemeSettings() | |