Verified Owner
Top Fields Constructors Methods
org.jabref.gui.libraryproperties

public Class LibraryPropertiesViewModel

extends Object
Class Inheritance
Imports
java.util.List, org.jabref.gui.libraryproperties.constants.ConstantsPropertiesView, org.jabref.gui.libraryproperties.contentselectors.ContentSelectorView, org.jabref.gui.libraryproperties.general.GeneralPropertiesView, org.jabref.gui.libraryproperties.git.GitPropertiesView, org.jabref.gui.libraryproperties.keypattern.KeyPatternPropertiesView, org.jabref.gui.libraryproperties.preamble.PreamblePropertiesView, org.jabref.gui.libraryproperties.saving.SavingPropertiesView, org.jabref.logic.l10n.Localization, org.jabref.logic.undo.UndoManager, org.jabref.model.database.BibDatabaseContext, org.jabref.model.metadata.MetaData, org.jabref.model.undo.UndoableMetaDataChange

Field Summary

Modifier and TypeField and Description
private final BibDatabaseContext
private final List<PropertiesTab>
private final UndoManager

Constructor Summary

AccessConstructor and Description
public
pack-priv
LibraryPropertiesViewModel(BibDatabaseContext databaseContext, UndoManager undoManager, List<PropertiesTab> propertiesTabs)

For tests, which cannot build the tab views without a JavaFX toolkit.

Method Summary

Modifier and TypeMethod and Description
public List<PropertiesTab>
public void
setValues()

Fills the tabs from the library's settings as they stand.

public void
storeAllSettings()

Stores every tab as one undo step.

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databaseContextback to summary
private final BibDatabaseContext databaseContext
propertiesTabsback to summary
private final List<PropertiesTab> propertiesTabs
undoManagerback to summary
private final UndoManager undoManager

Constructor Detail

LibraryPropertiesViewModelback to summary
public LibraryPropertiesViewModel(BibDatabaseContext databaseContext, UndoManager undoManager)
LibraryPropertiesViewModelback to summary
pack-priv LibraryPropertiesViewModel(BibDatabaseContext databaseContext, UndoManager undoManager, List<PropertiesTab> propertiesTabs)

For tests, which cannot build the tab views without a JavaFX toolkit.

Method Detail

getPropertiesTabsback to summary
public List<PropertiesTab> getPropertiesTabs()
setValuesback to summary
public void setValues()

Fills the tabs from the library's settings as they stand. The copy the tabs write to is made in storeAllSettings, so that it holds whatever the library has when the dialog is accepted rather than what it had when the dialog was opened.

storeAllSettingsback to summary
public void storeAllSettings()

Stores every tab as one undo step.

The tabs write into a copy of the library's settings, and the step installs that copy. Two things follow from the copy. The dialog reaches the library through one door — the change record — instead of through a dozen setters, so the library sees one change, correctly described as journalled, rather than one event per setting that nothing can attribute. And the settings are recorded as the pair of states they went between, which is the only shape available: seven tabs write straight into the metadata, so there is no per-setting change to collect.

What the tabs record themselves — the preamble, the string constants, the entries the keyword separator migration rewrites — joins the same step, since those are not settings and the block collects whatever is recorded inside it.

validateAllSettingsback to summary
public boolean validateAllSettings()