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

pack-priv abstract Class FieldsEditorTab

extends TabWithPreviewPanel
Class Inheritance
Known Direct Subclasses
org.jabref.gui.entryeditor.UserDefinedFieldsTab, org.jabref.gui.entryeditor.AllFieldsTab
Imports
java.util.ArrayList, .Collection, .LinkedHashMap, .List, .Map, .SequencedSet, java.util.stream.Stream, javafx.collections.ObservableList, javafx.geometry.VPos, javafx.scene.Node, .Parent, javafx.scene.control.Label, .ScrollPane, .SplitPane, javafx.scene.layout.ColumnConstraints, .GridPane, .Priority, .Region, .RowConstraints, org.jabref.gui.LibraryTab, .StateManager, org.jabref.gui.autocompleter.SuggestionProviders, org.jabref.gui.fieldeditors.FieldEditorFX, .FieldEditors, .FieldNameLabel, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.preview.PreviewPanel, org.jabref.gui.undo.RedoAction, .UndoAction, org.jabref.logic.journals.JournalAbbreviationRepository, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.Field, com.tobiasdiez.easybind.EasyBind, com.tobiasdiez.easybind.Subscription, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

A single tab displayed in the EntryEditor holding several FieldEditors.

Field Summary

Modifier and TypeField and Description
private com.tobiasdiez.easybind.Subscription
protected final Map<Field, FieldEditorFX>
private Collection<Field>
protected GridPane
private final boolean
private final JournalAbbreviationRepository
private static final Logger
private final GuiPreferences
private final RedoAction
private final UndoAction
Inherited from org.jabref.gui.entryeditor.TabWithPreviewPanel:
previewPanelstateManager

Constructor Summary

AccessConstructor and Description
public
FieldsEditorTab(boolean compressed, UndoAction undoAction, RedoAction redoAction, @NonNull GuiPreferences preferences, @NonNull JournalAbbreviationRepository journalAbbreviationRepository, StateManager stateManager, PreviewPanel previewPanel)

Method Summary

Modifier and TypeMethod and Description
private static void
addColumn(GridPane gridPane, int columnIndex, List<Label> nodes)

private static void
addColumn(GridPane gridPane, int columnIndex, Stream<Parent> nodes)

private void
protected void
protected Label
createLabelAndEditor(BibDatabaseContext databaseContext, BibEntry entry, Field field)

protected abstract SequencedSet<Field>
protected Node
getEditorContent()

The node placed inside the tab's ScrollPane.

public Collection<Field>
protected void
handleFocus()

Overrides org.jabref.gui.entryeditor.EntryEditorTab.handleFocus.

Override to perform a special action on focus (like selecting the first field in the editor).

private void
protected void
layoutEditors(BibDatabaseContext bibDatabaseContext, BibEntry entry, boolean compressed, List<Label> labels)

Arranges the created labels and editors inside gridPane.

public void
public void
requestFocus(Field fieldName)

private void
protected static void
setCompressedRowLayout(GridPane gridPane, int rows)

private void
protected void
setupPanel(BibDatabaseContext bibDatabaseContext, BibEntry entry, boolean compressed)

protected boolean
stretchContentToTabHeight()

true (default): content fills the tab height, rows share the space (classic category tabs).

Inherited from org.jabref.gui.entryeditor.TabWithPreviewPanel:
removePreviewPanelFromOtherTabs

Field Detail

dividerPositionSubscriptionback to summary
private com.tobiasdiez.easybind.Subscription dividerPositionSubscription
Annotations
@SuppressWarnings:FieldCanBeLocal
editorsback to summary
protected final Map<Field, FieldEditorFX> editors
fieldsback to summary
private Collection<Field> fields
gridPaneback to summary
protected GridPane gridPane
isCompressedback to summary
private final boolean isCompressed
journalAbbreviationRepositoryback to summary
private final JournalAbbreviationRepository journalAbbreviationRepository
LOGGERback to summary
private static final Logger LOGGER

Hides org.jabref.gui.entryeditor.EntryEditorTab.LOGGER.

preferencesback to summary
private final GuiPreferences preferences
redoActionback to summary
private final RedoAction redoAction
undoActionback to summary
private final UndoAction undoAction

Constructor Detail

FieldsEditorTabback to summary
public FieldsEditorTab(boolean compressed, UndoAction undoAction, RedoAction redoAction, @NonNull GuiPreferences preferences, @NonNull JournalAbbreviationRepository journalAbbreviationRepository, StateManager stateManager, PreviewPanel previewPanel)

Method Detail

addColumnback to summary
private static void addColumn(GridPane gridPane, int columnIndex, List<Label> nodes)
addColumnback to summary
private static void addColumn(GridPane gridPane, int columnIndex, Stream<Parent> nodes)
addPreviewPanelback to summary
private void addPreviewPanel()
bindToEntryback to summary
protected void bindToEntry(BibEntry entry)

Overrides org.jabref.gui.entryeditor.TabWithPreviewPanel.bindToEntry.

Annotations
@Override
createLabelAndEditorback to summary
protected Label createLabelAndEditor(BibDatabaseContext databaseContext, BibEntry entry, Field field)
determineFieldsToShowback to summary
protected abstract SequencedSet<Field> determineFieldsToShow(BibEntry entry)
getEditorContentback to summary
protected Node getEditorContent()

The node placed inside the tab's ScrollPane. By default the field grid itself; subclasses may wrap gridPane in a larger structure (e.g. with collapsible sections) and return that instead. Called once from initPanel().

getShownFieldsback to summary
public Collection<Field> getShownFields()
handleFocusback to summary
protected void handleFocus()

Overrides org.jabref.gui.entryeditor.EntryEditorTab.handleFocus.

Doc from org.jabref.gui.entryeditor.EntryEditorTab.handleFocus.

Override to perform a special action on focus (like selecting the first field in the editor).

Annotations
@Override
initPanelback to summary
private void initPanel()
layoutEditorsback to summary
protected void layoutEditors(BibDatabaseContext bibDatabaseContext, BibEntry entry, boolean compressed, List<Label> labels)

Arranges the created labels and editors inside gridPane. The default layout stretches the editors to fill the tab height (one or two columns). Subclasses may override for other layouts.

removePreviewPanelFromThisTabback to summary
public void removePreviewPanelFromThisTab()
requestFocusback to summary
public void requestFocus(Field fieldName)
savePreviewWidthDividerPositionback to summary
private void savePreviewWidthDividerPosition(Number position)
setCompressedRowLayoutback to summary
protected static void setCompressedRowLayout(GridPane gridPane, int rows)
setRegularRowLayoutback to summary
private void setRegularRowLayout(GridPane gridPane)
setupPanelback to summary
protected void setupPanel(BibDatabaseContext bibDatabaseContext, BibEntry entry, boolean compressed)
stretchContentToTabHeightback to summary
protected boolean stretchContentToTabHeight()

true (default): content fills the tab height, rows share the space (classic category tabs). false: content keeps its natural height and the tab scrolls vertically (single-list tab).