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

public Class EntryEditorTabViewModel

extends Object
implements PreferenceTabViewModel
Class Inheritance
All Implemented Interfaces
org.jabref.gui.preferences.PreferenceTabViewModel
Imports
java.nio.file.Path, java.util.ArrayList, .List, .Optional, javafx.beans.property.BooleanProperty, .ListProperty, .ObjectProperty, .ReadOnlyListProperty, .SimpleBooleanProperty, .SimpleListProperty, .SimpleObjectProperty, javafx.collections.FXCollections, .ObservableList, org.jabref.gui.DialogService, org.jabref.gui.entryeditor.EntryEditorPreferences, .EntryEditorTabModel, org.jabref.gui.preferences.PreferenceTabViewModel, org.jabref.logic.importer.fetcher.MrDlibPreferences, org.jabref.logic.importer.fetcher.citation.CitationCountFetcherType, org.jabref.logic.journals.AbbreviationPreferences, org.jabref.logic.l10n.Localization, org.jabref.logic.msc.MscCodeLoader, org.jabref.logic.util.BackgroundTask, .Directories, .TaskExecutor, .URLUtil, org.jabref.logic.util.strings.StringUtil, com.tobiasdiez.easybind.EasyBind, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final AbbreviationPreferences
private final BooleanProperty
private final BooleanProperty
private final BooleanProperty
private final ObjectProperty<CitationCountFetcherType>
private final ListProperty<CitationCountFetcherType>
private final BooleanProperty
private final DialogService
private final BooleanProperty
private final BooleanProperty
private final EntryEditorPreferences
private final BooleanProperty
private static final Logger
private final MrDlibPreferences
private boolean
private final BooleanProperty
private final ObservableList<EditorTabViewModel>
tabs

Working copy of tab configurations — not the live preferences list.

private final TaskExecutor

Constructor Summary

AccessConstructor and Description
public
EntryEditorTabViewModel(DialogService dialogService, EntryEditorPreferences entryEditorPreferences, MrDlibPreferences mrDlibPreferences, AbbreviationPreferences abbreviationPreferences, TaskExecutor taskExecutor)

Method Summary

Modifier and TypeMethod and Description
public BooleanProperty
public Optional<EditorTabViewModel>
addCustomTab(String name)

Adds a custom tab with the given name, or returns the existing tab when one with that name (custom or built-in, compared case-insensitively) is already present.

public boolean
addFieldPattern(EditorTabViewModel tab, String pattern)

Adds a field pattern to the given custom tab; false if the pattern is blank or already on that tab.

public BooleanProperty
public BooleanProperty
public ObjectProperty<CitationCountFetcherType>
public ReadOnlyListProperty<CitationCountFetcherType>
private static boolean
containsIgnoreCase(List<String> patterns, String pattern)

public BooleanProperty
private void
public BooleanProperty
public BooleanProperty
public ObservableList<EditorTabViewModel>
public boolean
isFieldPatternDuplicated(String pattern)

true if the pattern occurs on more than one tab (duplicates within one tab are prevented on add) — the fields table shows a warning sign on such rows.

public BooleanProperty
private void
public BooleanProperty
public void
public void
public void
resetToDefaults()

Restores the default tab set: every built-in tab visible in default order, no custom tabs.

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 void
storeSettings()

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

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abbreviationPreferencesback to summary
private final AbbreviationPreferences abbreviationPreferences
acceptRecommendationsPropertyback to summary
private final BooleanProperty acceptRecommendationsProperty
allowIntegerEditionPropertyback to summary
private final BooleanProperty allowIntegerEditionProperty
autoLinkEnabledPropertyback to summary
private final BooleanProperty autoLinkEnabledProperty
citationCountFetcherTypePropertyback to summary
private final ObjectProperty<CitationCountFetcherType> citationCountFetcherTypeProperty
citationCountFetcherTypesback to summary
private final ListProperty<CitationCountFetcherType> citationCountFetcherTypes
defaultSourcePropertyback to summary
private final BooleanProperty defaultSourceProperty
dialogServiceback to summary
private final DialogService dialogService
enableMscKeywordDescriptionsPropertyback to summary
private final BooleanProperty enableMscKeywordDescriptionsProperty
enableValidationPropertyback to summary
private final BooleanProperty enableValidationProperty
entryEditorPreferencesback to summary
private final EntryEditorPreferences entryEditorPreferences
journalPopupPropertyback to summary
private final BooleanProperty journalPopupProperty
LOGGERback to summary
private static final Logger LOGGER
mrDlibPreferencesback to summary
private final MrDlibPreferences mrDlibPreferences
mscKeywordDescriptionsInitializedback to summary
private boolean mscKeywordDescriptionsInitialized
openOnNewEntryPropertyback to summary
private final BooleanProperty openOnNewEntryProperty
tabsback to summary
private final ObservableList<EditorTabViewModel> tabs

Working copy of tab configurations — not the live preferences list. Written to preferences only in storeSettings(). Excludes the Preview tab (see setValues()).

taskExecutorback to summary
private final TaskExecutor taskExecutor

Constructor Detail

EntryEditorTabViewModelback to summary
public EntryEditorTabViewModel(DialogService dialogService, EntryEditorPreferences entryEditorPreferences, MrDlibPreferences mrDlibPreferences, AbbreviationPreferences abbreviationPreferences, TaskExecutor taskExecutor)

Method Detail

acceptRecommendationsPropertyback to summary
public BooleanProperty acceptRecommendationsProperty()
addCustomTabback to summary
public Optional<EditorTabViewModel> addCustomTab(String name)

Adds a custom tab with the given name, or returns the existing tab when one with that name (custom or built-in, compared case-insensitively) is already present. Empty for a blank name.

addFieldPatternback to summary
public boolean addFieldPattern(EditorTabViewModel tab, String pattern)

Adds a field pattern to the given custom tab; false if the pattern is blank or already on that tab.

allowIntegerEditionPropertyback to summary
public BooleanProperty allowIntegerEditionProperty()
autoLinkFilesEnabledPropertyback to summary
public BooleanProperty autoLinkFilesEnabledProperty()
citationCountFetcherTypePropertyback to summary
public ObjectProperty<CitationCountFetcherType> citationCountFetcherTypeProperty()
citationCountFetcherTypesback to summary
public ReadOnlyListProperty<CitationCountFetcherType> citationCountFetcherTypes()
containsIgnoreCaseback to summary
private static boolean containsIgnoreCase(List<String> patterns, String pattern)
defaultSourcePropertyback to summary
public BooleanProperty defaultSourceProperty()
downloadMscCodesback to summary
private void downloadMscCodes()
enableMscKeywordDescriptionsPropertyback to summary
public BooleanProperty enableMscKeywordDescriptionsProperty()
enableValidationPropertyback to summary
public BooleanProperty enableValidationProperty()
getTabsback to summary
public ObservableList<EditorTabViewModel> getTabs()
isFieldPatternDuplicatedback to summary
public boolean isFieldPatternDuplicated(String pattern)

true if the pattern occurs on more than one tab (duplicates within one tab are prevented on add) — the fields table shows a warning sign on such rows. Literal comparison only; overlap between a regex pattern and the field names it captures is not detected.

journalPopupPropertyback to summary
public BooleanProperty journalPopupProperty()
onMscKeywordDescriptionsChangedback to summary
private void onMscKeywordDescriptionsChanged(Boolean newValue)
openOnNewEntryPropertyback to summary
public BooleanProperty openOnNewEntryProperty()
removeFieldPatternback to summary
public void removeFieldPattern(EditorTabViewModel tab, String pattern)
removeTabback to summary
public void removeTab(EditorTabViewModel tab)
resetToDefaultsback to summary
public void resetToDefaults()

Restores the default tab set: every built-in tab visible in default order, no custom tabs.

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
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