Verified Owner
Top Fields Constructors Methods
org.jabref.gui.welcome.quicksettings.viewmodel

public Class ThemeDialogViewModel

extends AbstractViewModel
Class Inheritance
Imports
java.nio.file.Files, .InvalidPathException, .Path, java.util.Optional, javafx.beans.property.BooleanProperty, .ObjectProperty, .ReadOnlyListProperty, .ReadOnlyListWrapper, .SimpleBooleanProperty, .SimpleObjectProperty, .SimpleStringProperty, .StringProperty, javafx.collections.FXCollections, org.jabref.gui.AbstractViewModel, .DialogService, .WorkspacePreferences, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.theme.StyleSheet, .ThemeColorScheme, .ThemePreset, org.jabref.gui.util.FileDialogConfiguration, org.jabref.logic.util.StandardFileType, org.jabref.logic.util.strings.StringUtil

Field Summary

Modifier and TypeField and Description
private final ReadOnlyListProperty<ThemeColorScheme>
private final StringProperty
private final BooleanProperty
private final DialogService
private final GuiPreferences
private final ObjectProperty<ThemeColorScheme>
private final ObjectProperty<ThemePreset>
private final ReadOnlyListProperty<ThemePreset>
private final WorkspacePreferences

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ReadOnlyListProperty<ThemeColorScheme>
public StringProperty
public BooleanProperty
private ThemePreset
private ThemeColorScheme
public void
private void
public boolean
private void
refreshThemeNames()

Paired themes are named after the hue of the current color scheme, and the combo box re-reads the names of its entries when the item list changes.

public void
public ObjectProperty<ThemeColorScheme>
public ObjectProperty<ThemePreset>
public ReadOnlyListProperty<ThemePreset>

Field Detail

colorSchemeListPropertyback to summary
private final ReadOnlyListProperty<ThemeColorScheme> colorSchemeListProperty
customPathToThemePropertyback to summary
private final StringProperty customPathToThemeProperty
customThemeEnabledback to summary
private final BooleanProperty customThemeEnabled
dialogServiceback to summary
private final DialogService dialogService
preferencesback to summary
private final GuiPreferences preferences
selectedThemeColorSchemePropertyback to summary
private final ObjectProperty<ThemeColorScheme> selectedThemeColorSchemeProperty
selectedThemePropertyback to summary
private final ObjectProperty<ThemePreset> selectedThemeProperty
themesListPropertyback to summary
private final ReadOnlyListProperty<ThemePreset> themesListProperty
workspacePreferencesback to summary
private final WorkspacePreferences workspacePreferences

Constructor Detail

ThemeDialogViewModelback to summary
public ThemeDialogViewModel(GuiPreferences preferences, DialogService dialogService)

Method Detail

colorSchemeListPropertyback to summary
public ReadOnlyListProperty<ThemeColorScheme> colorSchemeListProperty()
customPathToThemePropertyback to summary
public StringProperty customPathToThemeProperty()
customThemeEnabledPropertyback to summary
public BooleanProperty customThemeEnabledProperty()
getSelectedThemeback to summary
private ThemePreset getSelectedTheme()
getSelectedThemeColorSchemeback to summary
private ThemeColorScheme getSelectedThemeColorScheme()
importCSSFileback to summary
public void importCSSFile()
initializeFromCurrentThemeback to summary
private void initializeFromCurrentTheme()
isValidConfigurationback to summary
public boolean isValidConfiguration()
refreshThemeNamesback to summary
private void refreshThemeNames()

Paired themes are named after the hue of the current color scheme, and the combo box re-reads the names of its entries when the item list changes. The selection is left alone: its own cell is refreshed by the view, so that the theme never passes through an invalid null in between.

saveSettingsback to summary
public void saveSettings()
selectedThemeColorSchemePropertyback to summary
public ObjectProperty<ThemeColorScheme> selectedThemeColorSchemeProperty()
selectedThemePropertyback to summary
public ObjectProperty<ThemePreset> selectedThemeProperty()
themesListPropertyback to summary
public ReadOnlyListProperty<ThemePreset> themesListProperty()