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

public abstract Class AbstractPreferenceTabView<T extends PreferenceTabViewModel>

extends Object
implements PreferencesTab
Class Inheritance
All Implemented Interfaces
org.jabref.gui.preferences.PreferencesTab
Known Direct Subclasses
org.jabref.gui.preferences.ai.AiTab, org.jabref.gui.preferences.autocompletion.AutoCompletionTab, org.jabref.gui.preferences.citationkeypattern.CitationKeyPatternTab, org.jabref.gui.preferences.customentrytypes.CustomEntryTypesTab, org.jabref.gui.preferences.customexporter.CustomExporterTab, org.jabref.gui.preferences.customimporter.CustomImporterTab, org.jabref.gui.preferences.entry.EntryTab, org.jabref.gui.preferences.entryeditor.EntryEditorTab, org.jabref.gui.preferences.export.ExportTab, org.jabref.gui.preferences.external.ExternalTab, org.jabref.gui.preferences.externalfiletypes.ExternalFileTypesTab, org.jabref.gui.preferences.general.GeneralTab, org.jabref.gui.preferences.git.GitTab, org.jabref.gui.preferences.groups.GroupsTab, org.jabref.gui.preferences.journals.JournalAbbreviationsTab, org.jabref.gui.preferences.keybindings.KeyBindingsTab, org.jabref.gui.preferences.linkedfiles.LinkedFilesTab, org.jabref.gui.preferences.nameformatter.NameFormatterTab, org.jabref.gui.preferences.network.NetworkTab, org.jabref.gui.preferences.ocr.OcrTab, org.jabref.gui.preferences.openoffice.OpenOfficeTab, org.jabref.gui.preferences.preview.PreviewTab, org.jabref.gui.preferences.protectedterms.ProtectedTermsTab, org.jabref.gui.preferences.table.TableTab, org.jabref.gui.preferences.websearch.WebSearchTab, org.jabref.gui.preferences.xmp.XmpPrivacyTab
Imports
java.util.List, javafx.scene.Node, org.jabref.gui.DialogService, org.jabref.gui.preferences.forms.PreferencesFormBuilder, org.jabref.logic.util.TaskExecutor, com.airhacks.afterburner.injection.Injector, org.jspecify.annotations.NonNull, .Nullable

Base class for preference tabs. A tab describes its UI with a PreferencesFormBuilder obtained from form() and delegates the PreferencesTab lifecycle to its view model.

A tab is not itself a node: the form the builder assembles is the tab's content, handed over with setContent. Were the tab a container of its own, every tab would nest that form in a second pane with the same spacing, and it would be ambiguous which of the two owns the layout.

Field Summary

Modifier and TypeField and Description
private @Nullable Node
protected final DialogService
private @Nullable PreferencesFormBuilder
form

The builder created via form(), kept to serve its texts to the preferences search.

protected final GuiPreferences
protected final TaskExecutor
protected T

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected PreferencesFormBuilder
form()

Creates the tab's builder, pre-wired with the services needed for section help buttons.

public Node
public List<String>
getRestartWarnings()

Implements org.jabref.gui.preferences.PreferencesTab.getRestartWarnings.

This method should be called after storing the preferences, This calls the appropriate method in the ViewModel.

public List<SearchableElement>
getSearchableElements()

Overrides default org.jabref.gui.preferences.PreferencesTab.getSearchableElements.

The visible texts of the tab with the nodes they caption; the preferences search matches these and highlights the node.

protected void
setContent(@NonNull Node content)

Hands the assembled form over as the tab's content; called once, from the tab's constructor.

public void
setValues()

Implements org.jabref.gui.preferences.PreferencesTab.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.PreferencesTab.storeSettings.

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

public boolean
validateSettings()

Implements org.jabref.gui.preferences.PreferencesTab.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

contentback to summary
private @Nullable Node content
dialogServiceback to summary
protected final DialogService dialogService
formback to summary
private @Nullable PreferencesFormBuilder form

The builder created via form(), kept to serve its texts to the preferences search.

preferencesback to summary
protected final GuiPreferences preferences
taskExecutorback to summary
protected final TaskExecutor taskExecutor
viewModelback to summary
protected T viewModel

Constructor Detail

AbstractPreferenceTabViewback to summary
protected AbstractPreferenceTabView()

Method Detail

formback to summary
protected PreferencesFormBuilder form()

Creates the tab's builder, pre-wired with the services needed for section help buttons. A tab describes itself with one form, so calling this twice would leave the first form's texts unreachable to the preferences search.

getContentback to summary
public Node getContent()

Implements org.jabref.gui.preferences.PreferencesTab.getContent.

Annotations
@Override
getRestartWarningsback to summary
public List<String> getRestartWarnings()

Implements org.jabref.gui.preferences.PreferencesTab.getRestartWarnings.

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

This method should be called after storing the preferences, This calls the appropriate method in the ViewModel.

Annotations
@Override
getSearchableElementsback to summary
public List<SearchableElement> getSearchableElements()

Overrides default org.jabref.gui.preferences.PreferencesTab.getSearchableElements.

Doc from org.jabref.gui.preferences.PreferencesTab.getSearchableElements.

The visible texts of the tab with the nodes they caption; the preferences search matches these and highlights the node.

Annotations
@Override
setContentback to summary
protected void setContent(@NonNull Node content)

Hands the assembled form over as the tab's content; called once, from the tab's constructor.

setValuesback to summary
public void setValues()

Implements org.jabref.gui.preferences.PreferencesTab.setValues.

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

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

Annotations
@Override
storeSettingsback to summary
public void storeSettings()

Implements org.jabref.gui.preferences.PreferencesTab.storeSettings.

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

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

Annotations
@Override
validateSettingsback to summary
public boolean validateSettings()

Implements org.jabref.gui.preferences.PreferencesTab.validateSettings.

Doc from org.jabref.gui.preferences.PreferencesTab.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. This calls the appropriate method in the ViewModel.

Annotations
@Override