Verified Owner
Top Fields Constructors Methods
org.jabref.gui.preferences.general

public Class GeneralTabViewModel

extends Object
implements PreferenceTabViewModel
Class Inheritance
All Implemented Interfaces
org.jabref.gui.preferences.PreferenceTabViewModel
Imports
java.io.IOException, java.net.URI, java.nio.file.Path, java.util.ArrayList, .List, .Objects, .Optional, javafx.beans.property.BooleanProperty, .ListProperty, .ObjectProperty, .ReadOnlyListProperty, .ReadOnlyListWrapper, .SimpleBooleanProperty, .SimpleListProperty, .SimpleObjectProperty, .SimpleStringProperty, .StringProperty, javafx.collections.FXCollections, javafx.scene.control.SpinnerValueFactory, org.jabref.gui.DialogService, .StateManager, .WorkspacePreferences, org.jabref.gui.desktop.os.NativeDesktop, org.jabref.gui.preferences.GuiPreferences, .PreferenceTabViewModel, org.jabref.gui.remote.CLIMessageHandler, org.jabref.gui.theme.StyleSheet, .ThemeColorScheme, .ThemePreset, org.jabref.gui.util.DirectoryDialogConfiguration, .FileDialogConfiguration, org.jabref.http.manager.HttpServerManager, org.jabref.languageserver.controller.LanguageServerController, org.jabref.logic.FilePreferences, .LibraryPreferences, .UiMessageHandler, org.jabref.logic.l10n.Language, .Localization, org.jabref.logic.net.ssl.TrustStoreManager, org.jabref.logic.remote.RemotePreferences, .RemoteUtil, org.jabref.logic.remote.server.RemoteListenerServerManager, org.jabref.logic.search.SearchPreferences, org.jabref.logic.util.StandardFileType, org.jabref.logic.util.strings.StringUtil, org.jabref.model.database.BibDatabaseMode, de.saxsys.mvvmfx.utils.validation.CompositeValidator, de.saxsys.mvvmfx.utils.validation.FunctionBasedValidator, de.saxsys.mvvmfx.utils.validation.ValidationMessage, de.saxsys.mvvmfx.utils.validation.ValidationStatus, de.saxsys.mvvmfx.utils.validation.Validator

Field Summary

Modifier and TypeField and Description
private final BooleanProperty
private final BooleanProperty
private final StringProperty
private final ListProperty<BibDatabaseMode>
private final ReadOnlyListProperty<ThemeColorScheme>
private final BooleanProperty
private final BooleanProperty
private final StringProperty
private final BooleanProperty
private final DialogService
private final BooleanProperty
private final BooleanProperty
private final BooleanProperty
private final FilePreferences
private final BooleanProperty
private final StringProperty
private final de.saxsys.mvvmfx.utils.validation.Validator
protected static SpinnerValueFactory<Integer>
private final BooleanProperty
private final StringProperty
private final de.saxsys.mvvmfx.utils.validation.Validator
private final HttpServerManager
private final LanguageServerController
private final StringProperty
private final de.saxsys.mvvmfx.utils.validation.Validator
private final ReadOnlyListProperty<Language>
private final LibraryPreferences
private final BooleanProperty
private final GuiPreferences
private final RemoteListenerServerManager
private final StringProperty
private final de.saxsys.mvvmfx.utils.validation.Validator
private final RemotePreferences
private final BooleanProperty
private final List<String>
private final SearchPreferences
private final ObjectProperty<BibDatabaseMode>
private final ObjectProperty<Language>
private final ObjectProperty<ThemeColorScheme>
private final ObjectProperty<ThemePreset>
private final BooleanProperty
private final BooleanProperty
private final StateManager
private final de.saxsys.mvvmfx.utils.validation.Validator
private final ReadOnlyListProperty<ThemePreset>
private final de.saxsys.mvvmfx.utils.validation.Validator
private final TrustStoreManager
private final UiMessageHandler
private final BooleanProperty
private final WorkspacePreferences

Constructor Summary

AccessConstructor and Description
public
GeneralTabViewModel(DialogService dialogService, GuiPreferences preferences, HttpServerManager httpServerManager, LanguageServerController languageServerController, UiMessageHandler uiMessageHandler, RemoteListenerServerManager remoteListenerServerManager, StateManager stateManager)

Method Summary

Modifier and TypeMethod and Description
public BooleanProperty
public BooleanProperty
public StringProperty
public void
public ListProperty<BibDatabaseMode>
public ReadOnlyListProperty<ThemeColorScheme>
public BooleanProperty
public BooleanProperty
public BooleanProperty
public StringProperty
public BooleanProperty
public BooleanProperty
public BooleanProperty
public BooleanProperty
public BooleanProperty
public BooleanProperty
public StringProperty
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
private Optional<Integer>
public List<String>
getRestartWarnings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

This method should be called after storing the preferences, to collect the properties, which require a restart of JabRef to load

public StringProperty
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
public void
public StringProperty
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
public ReadOnlyListProperty<Language>
public void
public BooleanProperty
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 StringProperty
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
public BooleanProperty
public ObjectProperty<BibDatabaseMode>
public ObjectProperty<Language>
public ObjectProperty<ThemeColorScheme>
public ObjectProperty<ThemePreset>
public void
setValues()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.setValues.

This method is called when the dialog is opened, or if it is made visible after being hidden.

public BooleanProperty
public BooleanProperty
public void
storeSettings()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

This method is called when the user presses OK in the Preferences dialog.

public de.saxsys.mvvmfx.utils.validation.ValidationStatus
public ReadOnlyListProperty<ThemePreset>
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
public BooleanProperty
public boolean
validateSettings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.validateSettings.

This method is called before the storeSettings() method, to check if there are illegal settings in the tab, or if is ready to be closed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

alwaysReformatBibPropertyback to summary
private final BooleanProperty alwaysReformatBibProperty
autosaveLocalLibrariesback to summary
private final BooleanProperty autosaveLocalLibraries
backupDirectoryPropertyback to summary
private final StringProperty backupDirectoryProperty
bibliographyModeListPropertyback to summary
private final ListProperty<BibDatabaseMode> bibliographyModeListProperty
colorSchemeListPropertyback to summary
private final ReadOnlyListProperty<ThemeColorScheme> colorSchemeListProperty
confirmDeletePropertyback to summary
private final BooleanProperty confirmDeleteProperty
createBackupPropertyback to summary
private final BooleanProperty createBackupProperty
customPathToThemePropertyback to summary
private final StringProperty customPathToThemeProperty
customThemeEnabledback to summary
private final BooleanProperty customThemeEnabled
dialogServiceback to summary
private final DialogService dialogService
donationNeverShowPropertyback to summary
private final BooleanProperty donationNeverShowProperty
enableHttpServerPropertyback to summary
private final BooleanProperty enableHttpServerProperty
enableLanguageServerPropertyback to summary
private final BooleanProperty enableLanguageServerProperty
filePreferencesback to summary
private final FilePreferences filePreferences
fontOverridePropertyback to summary
private final BooleanProperty fontOverrideProperty
fontSizePropertyback to summary
private final StringProperty fontSizeProperty
fontSizeValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator fontSizeValidator
fontSizeValueFactoryback to summary
protected static SpinnerValueFactory<Integer> fontSizeValueFactory
hideTabBarPropertyback to summary
private final BooleanProperty hideTabBarProperty
httpPortPropertyback to summary
private final StringProperty httpPortProperty
httpPortValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator httpPortValidator
httpServerManagerback to summary
private final HttpServerManager httpServerManager
languageServerControllerback to summary
private final LanguageServerController languageServerController
languageServerPortPropertyback to summary
private final StringProperty languageServerPortProperty
languageServerPortValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator languageServerPortValidator
languagesListPropertyback to summary
private final ReadOnlyListProperty<Language> languagesListProperty
libraryPreferencesback to summary
private final LibraryPreferences libraryPreferences
openLastStartupPropertyback to summary
private final BooleanProperty openLastStartupProperty
preferencesback to summary
private final GuiPreferences preferences
remoteListenerServerManagerback to summary
private final RemoteListenerServerManager remoteListenerServerManager
remotePortPropertyback to summary
private final StringProperty remotePortProperty
remotePortValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator remotePortValidator
remotePreferencesback to summary
private final RemotePreferences remotePreferences
remoteServerPropertyback to summary
private final BooleanProperty remoteServerProperty
restartWarningback to summary
private final List<String> restartWarning
searchPreferencesback to summary
private final SearchPreferences searchPreferences
selectedBiblatexModePropertyback to summary
private final ObjectProperty<BibDatabaseMode> selectedBiblatexModeProperty
selectedLanguagePropertyback to summary
private final ObjectProperty<Language> selectedLanguageProperty
selectedThemeColorSchemePropertyback to summary
private final ObjectProperty<ThemeColorScheme> selectedThemeColorSchemeProperty
selectedThemePropertyback to summary
private final ObjectProperty<ThemePreset> selectedThemeProperty
shouldAskForIncludingCrossReferencesPropertyback to summary
private final BooleanProperty shouldAskForIncludingCrossReferencesProperty
showAdvancedHintsPropertyback to summary
private final BooleanProperty showAdvancedHintsProperty
stateManagerback to summary
private final StateManager stateManager
themeColorSchemeValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator themeColorSchemeValidator
themesListPropertyback to summary
private final ReadOnlyListProperty<ThemePreset> themesListProperty
themeValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator themeValidator
trustStoreManagerback to summary
private final TrustStoreManager trustStoreManager
uiMessageHandlerback to summary
private final UiMessageHandler uiMessageHandler
usePostgresSearchPropertyback to summary
private final BooleanProperty usePostgresSearchProperty
workspacePreferencesback to summary
private final WorkspacePreferences workspacePreferences

Constructor Detail

GeneralTabViewModelback to summary
public GeneralTabViewModel(DialogService dialogService, GuiPreferences preferences, HttpServerManager httpServerManager, LanguageServerController languageServerController, UiMessageHandler uiMessageHandler, RemoteListenerServerManager remoteListenerServerManager, StateManager stateManager)

Method Detail

alwaysReformatBibPropertyback to summary
public BooleanProperty alwaysReformatBibProperty()
autosaveLocalLibrariesPropertyback to summary
public BooleanProperty autosaveLocalLibrariesProperty()
backupDirectoryPropertyback to summary
public StringProperty backupDirectoryProperty()
backupFileDirBrowseback to summary
public void backupFileDirBrowse()
biblatexModeListPropertyback to summary
public ListProperty<BibDatabaseMode> biblatexModeListProperty()
colorSchemeListPropertyback to summary
public ReadOnlyListProperty<ThemeColorScheme> colorSchemeListProperty()
confirmDeletePropertyback to summary
public BooleanProperty confirmDeleteProperty()
confirmHideTabBarPropertyback to summary
public BooleanProperty confirmHideTabBarProperty()
createBackupPropertyback to summary
public BooleanProperty createBackupProperty()
customPathToThemePropertyback to summary
public StringProperty customPathToThemeProperty()
customThemeEnabledPropertyback to summary
public BooleanProperty customThemeEnabledProperty()
directHttpImportPropertyback to summary
public BooleanProperty directHttpImportProperty()
donationNeverShowPropertyback to summary
public BooleanProperty donationNeverShowProperty()
enableHttpServerPropertyback to summary
public BooleanProperty enableHttpServerProperty()
enableLanguageServerPropertyback to summary
public BooleanProperty enableLanguageServerProperty()
fontOverridePropertyback to summary
public BooleanProperty fontOverrideProperty()
fontSizePropertyback to summary
public StringProperty fontSizeProperty()
fontSizeValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus fontSizeValidationStatus()
getPortAsIntback to summary
private Optional<Integer> getPortAsInt(String value)
getRestartWarningsback to summary
public List<String> getRestartWarnings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

This method should be called after storing the preferences, to collect the properties, which require a restart of JabRef to load

Annotations
@Override
httpPortPropertyback to summary
public StringProperty httpPortProperty()
httpPortValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus httpPortValidationStatus()
importCSSFileback to summary
public void importCSSFile()
languageServerPortPropertyback to summary
public StringProperty languageServerPortProperty()
languageServerPortValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus languageServerPortValidationStatus()
languagesListPropertyback to summary
public ReadOnlyListProperty<Language> languagesListProperty()
openBrowserback to summary
public void openBrowser()
openLastStartupPropertyback to summary
public BooleanProperty openLastStartupProperty()
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.

remotePortPropertyback to summary
public StringProperty remotePortProperty()
remotePortValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus remotePortValidationStatus()
remoteServerPropertyback to summary
public BooleanProperty remoteServerProperty()
selectedBiblatexModePropertyback to summary
public ObjectProperty<BibDatabaseMode> selectedBiblatexModeProperty()
selectedLanguagePropertyback to summary
public ObjectProperty<Language> selectedLanguageProperty()
selectedThemeColorSchemePropertyback to summary
public ObjectProperty<ThemeColorScheme> selectedThemeColorSchemeProperty()
selectedThemePropertyback to summary
public ObjectProperty<ThemePreset> selectedThemeProperty()
setValuesback to summary
public void setValues()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.setValues.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.setValues.

This method is called when the dialog is opened, or if it is made visible after being hidden. The tab should update all its values.

This is the ONLY PLACE to set values for the fields in the tab. It is ILLEGAL to set values only at construction time, because the dialog will be reused and updated.

Annotations
@Override
shouldAskForIncludingCrossReferencesback to summary
public BooleanProperty shouldAskForIncludingCrossReferences()
showAdvancedHintsPropertyback to summary
public BooleanProperty showAdvancedHintsProperty()
storeSettingsback to summary
public void storeSettings()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

This method is called when the user presses OK in the Preferences dialog. Implementing classes must make sure all settings presented get stored in PreferencesService.

Annotations
@Override
themeColorSchemeValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus themeColorSchemeValidationStatus()
themesListPropertyback to summary
public ReadOnlyListProperty<ThemePreset> themesListProperty()
themeValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus themeValidationStatus()
usePostgresSearchPropertyback to summary
public BooleanProperty usePostgresSearchProperty()
validateSettingsback to summary
public boolean validateSettings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.validateSettings.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.validateSettings.

This method is called before the storeSettings() method, to check if there are illegal settings in the tab, or if is ready to be closed. If the tab is not ready, it should display a message to the user informing about the illegal setting.

Annotations
@Override