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

public Class ImportEntriesDialog

extends BaseDialog<Boolean>
Class Inheritance
Imports
java.util.ArrayList, .List, .Optional, javafx.beans.binding.Bindings, .BooleanBinding, javafx.beans.property.BooleanProperty, javafx.collections.ListChangeListener, .ObservableList, javafx.css.PseudoClass, javafx.fxml.FXML, javafx.geometry.Insets, javafx.scene.Cursor, .Node, javafx.scene.control.Button, .ButtonType, .CheckBox, .ComboBox, .Label, .ToggleButton, .Tooltip, javafx.scene.layout.Border, .BorderStroke, .BorderStrokeStyle, .BorderWidths, .CornerRadii, .HBox, .Priority, .VBox, javafx.scene.paint.Color, org.jabref.gui.DialogService, .StateManager, org.jabref.gui.bibtexhighlighter.BibTeXHighlighter, org.jabref.gui.entryeditor.citationrelationtab.BibEntryView, org.jabref.gui.icon.IconTheme, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.util.BaseDialog, .ControlHelper, .NoSelectionModel, .ViewModelListCellFactory, org.jabref.logic.importer.PagedSearchBasedFetcher, .ParserResult, .SearchBasedFetcher, org.jabref.logic.l10n.Localization, org.jabref.logic.shared.DatabaseLocation, org.jabref.logic.util.BackgroundTask, .TaskExecutor, org.jabref.logic.util.io.FileUtil, org.jabref.logic.util.strings.StringUtil, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.jabref.model.groups.AllEntriesGroup, .ExplicitGroup, .GroupTreeNode, org.jabref.model.util.FileUpdateMonitor, com.airhacks.afterburner.views.ViewLoader, com.tobiasdiez.easybind.EasyBind, io.github.kusoroadeolu.veneer.BibTeXSyntaxHighlighter, jakarta.inject.Inject, jfx.incubator.scene.control.richtext.CodeArea, org.controlsfx.control.CheckListView, org.jspecify.annotations.Nullable

Field Summary

Modifier and TypeField and Description
private CodeArea
private VBox
private Label
private BibTeXSyntaxHighlighter
private final BibDatabaseContext
private DialogService
private CheckBox
private CheckListView<BibEntry>
private BibEntryTypesManager
private FileUpdateMonitor
private ComboBox<GroupTreeNode>
private ButtonType
private ComboBox<BibDatabaseContext>
private Button
private Label
private HBox
private GuiPreferences
private Button
private final Optional<String>
private final Optional<SearchBasedFetcher>
private Label
private CheckBox
private StateManager
private Label
private final @Nullable String
targetGroup

Optional group the imported entries should be assigned to (e.g. supplied via the REST ?group= parameter).

private final org.jabref.logic.util.BackgroundTask<ParserResult>
private TaskExecutor
private Label
private ImportEntriesViewModel

Constructor Summary

AccessConstructor and Description
public
ImportEntriesDialog(BibDatabaseContext
the database to import into
database
,
org.jabref.logic.util.BackgroundTask<ParserResult>
the task executed for parsing the selected files(s).
task
)

Creates an import dialog for entries from file sources.

public
ImportEntriesDialog(BibDatabaseContext
the database to import into
database
,
org.jabref.logic.util.BackgroundTask<ParserResult>
the task executed for parsing the selected files(s).
task
,
@Nullable String
name of the group to pre-select, or null for none
targetGroup
)

Variant that pre-selects targetGroup in the group picker.

public
ImportEntriesDialog(BibDatabaseContext
database where the imported entries will be added
database
,
org.jabref.logic.util.BackgroundTask<ParserResult>
task that handles parsing and loading entries from the search results
task
,
SearchBasedFetcher
the search-based fetcher implementation used to retrieve entries from the web source
fetcher
,
String
the search string used to find relevant entries
query
)

Creates an import dialog for entries from web-based search sources.

Method Summary

Modifier and TypeMethod and Description
private void
private void
displayBibTeX(BibEntry entry, String bibTeX)

private void
private void
private void
private boolean
private void
private void
private void
public void
public void
private void
private void
public void
private void
private void
Inherited from org.jabref.gui.util.BaseDialog:
bringToFrontcloseOnKeyBindingMatchfitWindowToContent

Field Detail

bibTeXDataback to summary
private CodeArea bibTeXData
Annotations
@FXML
bibTeXDataBoxback to summary
private VBox bibTeXDataBox
Annotations
@FXML
bibTeXDataLabelback to summary
private Label bibTeXDataLabel
Annotations
@FXML
bibTeXSyntaxHighlighterback to summary
private BibTeXSyntaxHighlighter bibTeXSyntaxHighlighter
Annotations
@Inject
databaseback to summary
private final BibDatabaseContext database
dialogServiceback to summary
private DialogService dialogService
Annotations
@Inject
downloadLinkedOnlineFilesback to summary
private CheckBox downloadLinkedOnlineFiles
Annotations
@FXML
entriesListViewback to summary
private CheckListView<BibEntry> entriesListView
Annotations
@FXML
entryTypesManagerback to summary
private BibEntryTypesManager entryTypesManager
Annotations
@Inject
fileUpdateMonitorback to summary
private FileUpdateMonitor fileUpdateMonitor
Annotations
@Inject
groupListViewback to summary
private ComboBox<GroupTreeNode> groupListView
Annotations
@FXML
importButtonback to summary
private ButtonType importButton
Annotations
@FXML
libraryListViewback to summary
private ComboBox<BibDatabaseContext> libraryListView
Annotations
@FXML
nextPageButtonback to summary
private Button nextPageButton
Annotations
@FXML
pageNumberLabelback to summary
private Label pageNumberLabel
Annotations
@FXML
paginationBoxback to summary
private HBox paginationBox
Annotations
@FXML
preferencesback to summary
private GuiPreferences preferences
Annotations
@Inject
prevPageButtonback to summary
private Button prevPageButton
Annotations
@FXML
queryback to summary
private final Optional<String> query
searchBasedFetcherback to summary
private final Optional<SearchBasedFetcher> searchBasedFetcher
selectedItemsback to summary
private Label selectedItems
Annotations
@FXML
showEntryInformationback to summary
private CheckBox showEntryInformation
Annotations
@FXML
stateManagerback to summary
private StateManager stateManager
Annotations
@Inject
statusLabelback to summary
private Label statusLabel
Annotations
@FXML
targetGroupback to summary
private final @Nullable String targetGroup

Optional group the imported entries should be assigned to (e.g. supplied via the REST ?group= parameter). It pre-selects the matching group in the picker and acts as the fallback when the user does not pick an explicit group: in that case the import creates the group (if missing) and assigns the entries. An explicit selection in the picker overrides it. The group is only ever created on confirm, so cancelling imports nothing.

taskback to summary
private final org.jabref.logic.util.BackgroundTask<ParserResult> task
taskExecutorback to summary
private TaskExecutor taskExecutor
Annotations
@Inject
totalItemsback to summary
private Label totalItems
Annotations
@FXML
viewModelback to summary
private ImportEntriesViewModel viewModel

Constructor Detail

ImportEntriesDialogback to summary
public ImportEntriesDialog(BibDatabaseContext database, org.jabref.logic.util.BackgroundTask<ParserResult> task)

Creates an import dialog for entries from file sources. This constructor is used for importing entries from local files, BibTeX files, or other file-based sources that don't require pagination or search functionality.

Parameters
database:BibDatabaseContext

the database to import into

task:org.jabref.logic.util.BackgroundTask<ParserResult>

the task executed for parsing the selected files(s).

ImportEntriesDialogback to summary
public ImportEntriesDialog(BibDatabaseContext database, org.jabref.logic.util.BackgroundTask<ParserResult> task, @Nullable String targetGroup)

Variant that pre-selects targetGroup in the group picker. The group is created and assigned by the caller only after the dialog is confirmed (see getImportedEntries() / getImportTarget()).

Parameters
database:BibDatabaseContext

the database to import into

task:org.jabref.logic.util.BackgroundTask<ParserResult>

the task executed for parsing the selected files(s).

targetGroup:@Nullable String

name of the group to pre-select, or null for none

ImportEntriesDialogback to summary
public ImportEntriesDialog(BibDatabaseContext database, org.jabref.logic.util.BackgroundTask<ParserResult> task, SearchBasedFetcher fetcher, String query)

Creates an import dialog for entries from web-based search sources. This constructor is used for importing entries that support pagination and require search queries.

Parameters
database:BibDatabaseContext

database where the imported entries will be added

task:org.jabref.logic.util.BackgroundTask<ParserResult>

task that handles parsing and loading entries from the search results

fetcher:SearchBasedFetcher

the search-based fetcher implementation used to retrieve entries from the web source

query:String

the search string used to find relevant entries

Method Detail

collectGroupsFromTreeback to summary
private void collectGroupsFromTree(GroupTreeNode parent, List<GroupTreeNode> groupList)
displayBibTeXback to summary
private void displayBibTeX(BibEntry entry, String bibTeX)
initBibTeXback to summary
private void initBibTeX()
initializeback to summary
private void initialize()
Annotations
@FXML
initializeDialogback to summary
private void initializeDialog()
isOnLastPageAndPagedFetcherback to summary
private boolean isOnLastPageAndPagedFetcher()
onNextPageback to summary
private void onNextPage()
Annotations
@FXML
onPrevPageback to summary
private void onPrevPage()
Annotations
@FXML
restoreCheckedEntriesback to summary
private void restoreCheckedEntries()
selectAllEntriesback to summary
public void selectAllEntries()
selectAllNewEntriesback to summary
public void selectAllNewEntries()
setupGroupListViewback to summary
private void setupGroupListView()
setupPaginationBindingsback to summary
private void setupPaginationBindings()
unselectAllback to summary
public void unselectAll()
updateGroupListback to summary
private void updateGroupList()
updatePageUIback to summary
private void updatePageUI()