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

public Class MainTable

extends TableView<BibEntryTableViewModel>
Class Inheritance
Annotations
@org.jabref.architecture.AllowedToUseClassGetResource
Imports
java.io.File, .IOException, java.nio.file.Path, java.util.List, .Map, .Optional, java.util.stream.Collectors, javafx.collections.ListChangeListener, javafx.css.PseudoClass, javafx.geometry.Pos, javafx.scene.Node, javafx.scene.control.Button, .Label, .ProgressIndicator, .SelectionMode, .TableColumn, .TableRow, .TableView, javafx.scene.control.skin.VirtualFlow, javafx.scene.input.ClipboardContent, .DragEvent, .Dragboard, .KeyCode, .KeyEvent, .MouseDragEvent, .MouseEvent, .TransferMode, javafx.scene.layout.HBox, .VBox, org.jabref.architecture.AllowedToUseClassGetResource, org.jabref.gui.DialogService, .DragAndDropDataFormats, .LibraryTab, .LibraryTabContainer, .StateManager, org.jabref.gui.actions.StandardActions, org.jabref.gui.clipboard.ClipBoardManager, org.jabref.gui.edit.EditAction, org.jabref.gui.externalfiles.ExternalFilesEntryLinker, .FindUnlinkedFilesAction, .ImportHandler, org.jabref.gui.importer.fetcher.LookupIdentifierAction, org.jabref.gui.keyboard.KeyBinding, .KeyBindingRepository, org.jabref.gui.libraryproperties.LibraryPropertiesAction, org.jabref.gui.mergeentries.MergeWithFetchedEntryAction, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.preview.ClipboardContentGenerator, org.jabref.gui.search.MatchCategory, org.jabref.gui.theme.StyleClasses, org.jabref.gui.util.ControlHelper, .CustomLocalDragboard, .DragDrop, .UiTaskExecutor, .ViewModelTableRowFactory, org.jabref.gui.walkthrough.declarative.WalkthroughNodeIds, org.jabref.logic.FilePreferences, org.jabref.logic.citationstyle.CitationStyleOutputFormat, org.jabref.logic.importer.fetcher.CrossRef, org.jabref.logic.journals.JournalAbbreviationRepository, org.jabref.logic.l10n.Localization, org.jabref.logic.util.TaskExecutor, org.jabref.logic.util.io.FileUtil, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.jabref.model.entry.field.StandardField, org.jabref.model.entry.identifier.DOI, org.jabref.model.entry.types.StandardEntryType, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private boolean
private final ClipboardContentGenerator
private final ColumnPreferencesApplier
private final ColumnPreferencesRecorder
private String
private final BibDatabaseContext
private final DialogService
private final FilePreferences
private final ImportHandler
private long
private final LibraryTab
private final CustomLocalDragboard
private static final Logger
private static final PseudoClass
private static final PseudoClass
private static final PseudoClass
private final MainTableDataModel
private static final PseudoClass
private final GuiPreferences
private final StateManager
private final TaskExecutor
Inherited from javafx.scene.control.TableView:
CONSTRAINED_RESIZE_POLICYCONSTRAINED_RESIZE_POLICY_ALL_COLUMNSCONSTRAINED_RESIZE_POLICY_FLEX_LAST_COLUMNCONSTRAINED_RESIZE_POLICY_FLEX_NEXT_COLUMNCONSTRAINED_RESIZE_POLICY_LAST_COLUMNCONSTRAINED_RESIZE_POLICY_NEXT_COLUMNCONSTRAINED_RESIZE_POLICY_SUBSEQUENT_COLUMNSDEFAULT_SORT_POLICYUNCONSTRAINED_RESIZE_POLICY

Constructor Summary

AccessConstructor and Description
public
MainTable(MainTableDataModel model, LibraryTab libraryTab, LibraryTabContainer tabContainer, @NonNull BibDatabaseContext database, GuiPreferences preferences, DialogService dialogService, StateManager stateManager, KeyBindingRepository keyBindingRepository, JournalAbbreviationRepository journalAbbreviationRepository, ClipBoardManager clipBoardManager, BibEntryTypesManager entryTypesManager, TaskExecutor taskExecutor, ImportHandler importHandler)

There is one maintable instance per library tab

Method Summary

Modifier and TypeMethod and Description
private BibEntry
public void
public void
public void
public void
private void
public void
private Optional<BibEntryTableViewModel>
public List<BibEntry>
public MainTableDataModel
private void
private void
private void
private void
private void
private void
private void
private void
private boolean
private void
jumpToSearchKey(TableColumn<BibEntryTableViewModel, ?>
The sorted column in MainTable
sortedColumn
,
KeyEvent
The pressed character
keyEvent
)

This is called, if a user starts typing some characters into the keyboard with focus on main table.

private void
private void
public void
setCitationMergeMode(boolean citationMerge)

private void
private void
updatePlaceholder(Node noContentPlaceholder, Node loadingPlaceholder)

Inherited from javafx.scene.control.TableView:
columnResizePolicyPropertycomparatorPropertycreateDefaultSkinediteditablePropertyeditingCellPropertyfixedCellSizePropertyfocusModelPropertygetClassCssMetaDatagetColumnResizePolicygetColumnsgetComparatorgetControlCssMetaDatagetEditingCellgetFixedCellSizegetFocusModelgetItemsgetOnScrollTogetOnScrollToColumngetOnSortgetPlaceholdergetRowFactorygetSelectionModelgetSortOrdergetSortPolicygetVisibleLeafColumngetVisibleLeafColumnsgetVisibleLeafIndexisEditableisTableMenuButtonVisibleitemsPropertyonScrollToColumnPropertyonScrollToPropertyonSortPropertyplaceholderPropertyqueryAccessibleAttributerefreshresizeColumnrowFactoryPropertyscrollToscrollToscrollToColumnscrollToColumnIndexselectionModelPropertysetColumnResizePolicysetEditablesetFixedCellSizesetFocusModelsetItemssetOnScrollTosetOnScrollToColumnsetOnSortsetPlaceholdersetRowFactorysetSelectionModelsetSortPolicysetTableMenuButtonVisiblesortsortPolicyPropertytableMenuButtonVisibleProperty

Field Detail

citationMergeModeback to summary
private boolean citationMergeMode
clipboardContentGeneratorback to summary
private final ClipboardContentGenerator clipboardContentGenerator
columnPreferencesApplierback to summary
private final ColumnPreferencesApplier columnPreferencesApplier
columnPreferencesRecorderback to summary
private final ColumnPreferencesRecorder columnPreferencesRecorder
columnSearchTermback to summary
private String columnSearchTerm
databaseback to summary
private final BibDatabaseContext database
dialogServiceback to summary
private final DialogService dialogService
filePreferencesback to summary
private final FilePreferences filePreferences
importHandlerback to summary
private final ImportHandler importHandler
lastKeyPressTimeback to summary
private long lastKeyPressTime
libraryTabback to summary
private final LibraryTab libraryTab
localDragboardback to summary
private final CustomLocalDragboard localDragboard
LOGGERback to summary
private static final Logger LOGGER
MATCHING_SEARCH_AND_GROUPSback to summary
private static final PseudoClass MATCHING_SEARCH_AND_GROUPS
MATCHING_SEARCH_NOT_GROUPSback to summary
private static final PseudoClass MATCHING_SEARCH_NOT_GROUPS
modelback to summary
private final MainTableDataModel model
NOT_MATCHING_SEARCH_AND_GROUPSback to summary
private static final PseudoClass NOT_MATCHING_SEARCH_AND_GROUPS
preferencesback to summary
private final GuiPreferences preferences
stateManagerback to summary
private final StateManager stateManager
taskExecutorback to summary
private final TaskExecutor taskExecutor

Constructor Detail

MainTableback to summary
public MainTable(MainTableDataModel model, LibraryTab libraryTab, LibraryTabContainer tabContainer, @NonNull BibDatabaseContext database, GuiPreferences preferences, DialogService dialogService, StateManager stateManager, KeyBindingRepository keyBindingRepository, JournalAbbreviationRepository journalAbbreviationRepository, ClipBoardManager clipBoardManager, BibEntryTypesManager entryTypesManager, TaskExecutor taskExecutor, ImportHandler importHandler)

There is one maintable instance per library tab

Method Detail

addExampleEntryback to summary
private BibEntry addExampleEntry()
addSelectionListenerback to summary
public void addSelectionListener(ListChangeListener<? super BibEntryTableViewModel> listener)
clearAndSelectback to summary
public void clearAndSelect(@NonNull BibEntry bibEntry)
clearAndSelectback to summary
public void clearAndSelect(List<BibEntry> bibEntries)
clearAndSelectFirstback to summary
public void clearAndSelectFirst()
clearAndSelectLastback to summary
private void clearAndSelectLast()
disposeback to summary
public void dispose()
findEntryback to summary
private Optional<BibEntryTableViewModel> findEntry(@NonNull BibEntry entry)
getSelectedEntriesback to summary
public List<BibEntry> getSelectedEntries()
getTableModelback to summary
public MainTableDataModel getTableModel()
handleOnDragDetectedback to summary
private void handleOnDragDetected(TableRow<BibEntryTableViewModel> row, BibEntryTableViewModel entry, MouseEvent event)
handleOnDragDroppedback to summary
private void handleOnDragDropped(TableRow<BibEntryTableViewModel> row, BibEntryTableViewModel target, DragEvent event)
handleOnDragDroppedTableViewback to summary
private void handleOnDragDroppedTableView(DragEvent event)
handleOnDragEnteredback to summary
private void handleOnDragEntered(TableRow<BibEntryTableViewModel> row, BibEntryTableViewModel entry, MouseDragEvent event)
handleOnDragExitedback to summary
private void handleOnDragExited(TableRow<BibEntryTableViewModel> row, BibEntryTableViewModel entry, DragEvent dragEvent)
handleOnDragOverback to summary
private void handleOnDragOver(TableRow<BibEntryTableViewModel> row, BibEntryTableViewModel item, DragEvent event)
handleOnDragOverTableViewback to summary
private void handleOnDragOverTableView(DragEvent event)
importPdfsback to summary
private void importPdfs()
isFirstRowVisibleback to summary
private boolean isFirstRowVisible()
jumpToSearchKeyback to summary
private void jumpToSearchKey(TableColumn<BibEntryTableViewModel, ?> sortedColumn, KeyEvent keyEvent)

This is called, if a user starts typing some characters into the keyboard with focus on main table. The MainTable will scroll to the cell with the same starting column value and typed string If the user presses any other special key as well, e.g. alt or shift we don't jump

Parameters
sortedColumn:TableColumn<BibEntryTableViewModel, ?>

The sorted column in MainTable

keyEvent:KeyEvent

The pressed character

scrollToNextMatchCategoryback to summary
private void scrollToNextMatchCategory()
scrollToPreviousMatchCategoryback to summary
private void scrollToPreviousMatchCategory()
setCitationMergeModeback to summary
public void setCitationMergeMode(boolean citationMerge)
setupKeyBindingsback to summary
private void setupKeyBindings(KeyBindingRepository keyBindings)
updatePlaceholderback to summary
private void updatePlaceholder(Node noContentPlaceholder, Node loadingPlaceholder)