Verified Owner
Top Inners Fields Constructors Methods
org.jabref.gui.mergeentries.multiwaymerge

public Class MultiMergeEntriesView

extends BaseDialog<BibEntry>
Class Inheritance
Imports
java.util.HashMap, .List, .Map, .NoSuchElementException, .Objects, java.util.function.Supplier, javafx.beans.value.ChangeListener, .ObservableValue, javafx.collections.FXCollections, .ListChangeListener, .MapChangeListener, javafx.fxml.FXML, javafx.scene.control.Button, .ButtonBar, .ButtonType, .ComboBox, .ContentDisplay, .Control, .Label, .ProgressIndicator, .ScrollPane, .TextArea, .TextField, .TextInputControl, .ToggleButton, .ToggleGroup, .Tooltip, javafx.scene.input.KeyEvent, javafx.scene.layout.ColumnConstraints, .GridPane, .HBox, .Priority, .Region, .RowConstraints, .VBox, javafx.scene.text.TextAlignment, org.jabref.gui.icon.IconTheme, org.jabref.gui.mergeentries.DiffMode, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.util.BaseDialog, .BindingsHelper, .ControlHelper, .UiTaskExecutor, .ViewModelListCellFactory, org.jabref.logic.importer.FetcherException, .IdBasedFetcher, .WebFetchers, org.jabref.logic.importer.fetcher.DoiFetcher, org.jabref.logic.l10n.Localization, org.jabref.logic.util.TaskExecutor, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.Field, .FieldFactory, .FieldTextMapper, .StandardField, com.airhacks.afterburner.views.ViewLoader, com.tobiasdiez.easybind.EasyBind, com.tobiasdiez.easybind.EasyObservableValue, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
public static final int
private ScrollPane
private ComboBox<DiffMode>
private Label
private VBox
private VBox
private final HashMap<Field, MultiMergeEntriesView.FieldRow>
private final ToggleGroup
private ScrollPane
private static final Logger
private GridPane
private final GuiPreferences
private ScrollPane
private HBox
private final TaskExecutor
private ScrollPane
private final MultiMergeEntriesViewModel

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private void
addEmptyCellIfMissing(Field field, int columnIndex)

private void
addEmptyCellsForMissingFields(BibEntry entry, int columnIndex)

private void
public void
public void
addSource(String title, BibEntry entry)

public void
addSource(String title, Supplier<BibEntry> supplier)

public void
enableAutomaticIdentifierFetching()

Starts automatic identifier fetching for the columns already added via addSource.

private void
private ToggleButton
public void
private boolean

Returns:

true if the field may be multiline, false otherwise
isMultilineField
(Field
the field to be checked
field
)

Checks if the Field can be multiline

private void
setupSourceButtonAction(ToggleButton
the header button to setup
sourceButton
,
int
the column this button is heading
column
)

Set up the button that displays the name of the source so that if it is clicked, all toggles in that column are selected.

private void
private void
writeBibEntryToColumn(MultiMergeEntriesViewModel.EntrySource
the entry to write
entrySourceColumn
,
int
the index of the column to write this entry to
columnIndex
)

Adds ToggleButtons for all fields that are set for this BibEntry

Inherited from org.jabref.gui.util.BaseDialog:
bringToFrontcloseOnKeyBindingMatchfitWindowToContent

Field Detail

ACTIVE_COLUMNS_MINIMUMback to summary
public static final int ACTIVE_COLUMNS_MINIMUM
centerScrollPaneback to summary
private ScrollPane centerScrollPane
Annotations
@FXML
diffModeback to summary
private ComboBox<DiffMode> diffMode
Annotations
@FXML
failedSuppliersback to summary
private Label failedSuppliers
Annotations
@FXML
fieldEditorback to summary
private VBox fieldEditor
Annotations
@FXML
fieldHeaderback to summary
private VBox fieldHeader
Annotations
@FXML
fieldRowsback to summary
private final HashMap<Field, MultiMergeEntriesView.FieldRow> fieldRows
headerToggleGroupback to summary
private final ToggleGroup headerToggleGroup
leftScrollPaneback to summary
private ScrollPane leftScrollPane
Annotations
@FXML
LOGGERback to summary
private static final Logger LOGGER
optionsGridback to summary
private GridPane optionsGrid
Annotations
@FXML
preferencesback to summary
private final GuiPreferences preferences
rightScrollPaneback to summary
private ScrollPane rightScrollPane
Annotations
@FXML
supplierHeaderback to summary
private HBox supplierHeader
Annotations
@FXML
taskExecutorback to summary
private final TaskExecutor taskExecutor
topScrollPaneback to summary
private ScrollPane topScrollPane
Annotations
@FXML
viewModelback to summary
private final MultiMergeEntriesViewModel viewModel

Constructor Detail

MultiMergeEntriesViewback to summary
public MultiMergeEntriesView(GuiPreferences preferences, TaskExecutor taskExecutor)

Method Detail

addColumnback to summary
private void addColumn(MultiMergeEntriesViewModel.EntrySource entrySourceColumn)
addEmptyCellIfMissingback to summary
private void addEmptyCellIfMissing(Field field, int columnIndex)
addEmptyCellsForMissingFieldsback to summary
private void addEmptyCellsForMissingFields(BibEntry entry, int columnIndex)
addEmptyCellsForMissingSourcesback to summary
private void addEmptyCellsForMissingSources(Field field)
addFetchedColumnback to summary
public void addFetchedColumn(String title, IdBasedFetcher fetcher, String id)
addSourceback to summary
public void addSource(String title, BibEntry entry)
addSourceback to summary
public void addSource(String title, Supplier<BibEntry> supplier)
enableAutomaticIdentifierFetchingback to summary
public void enableAutomaticIdentifierFetching()

Starts automatic identifier fetching for the columns already added via addSource. Must be called after all initial sources have been added, since it only considers the columns present at call time.

fillDiffModesback to summary
private void fillDiffModes()
generateEntryHeaderback to summary
private ToggleButton generateEntryHeader(MultiMergeEntriesViewModel.EntrySource column, int columnIndex)
initializeback to summary
public void initialize()
Annotations
@FXML
isMultilineFieldback to summary
private boolean isMultilineField(Field field)

Checks if the Field can be multiline

Parameters
field:Field

the field to be checked

Returns:boolean

true if the field may be multiline, false otherwise

setupSourceButtonActionback to summary
private void setupSourceButtonAction(ToggleButton sourceButton, int column)

Set up the button that displays the name of the source so that if it is clicked, all toggles in that column are selected.

Parameters
sourceButton:ToggleButton

the header button to setup

column:int

the column this button is heading

triggerAutomaticIdentifierFetchback to summary
private void triggerAutomaticIdentifierFetch(MultiMergeEntriesViewModel.EntrySource entrySourceColumn)
writeBibEntryToColumnback to summary
private void writeBibEntryToColumn(MultiMergeEntriesViewModel.EntrySource entrySourceColumn, int columnIndex)

Adds ToggleButtons for all fields that are set for this BibEntry

Parameters
entrySourceColumn:MultiMergeEntriesViewModel.EntrySource

the entry to write

columnIndex:int

the index of the column to write this entry to

org.jabref.gui.mergeentries.multiwaymerge back to summary

private Class MultiMergeEntriesView.Cell

extends HBox
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
Cell(String content, Field field, int columnIndex)

Method Summary

Modifier and TypeMethod and Description
public String
Inherited from javafx.scene.layout.HBox:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthfillHeightPropertygetAlignmentgetBaselineOffsetgetClassCssMetaDatagetContentBiasgetCssMetaDatagetHgrowgetMargingetSpacingisFillHeightlayoutChildrenrequestLayoutsetAlignmentsetFillHeightsetHgrowsetMarginsetSpacingspacingProperty

Field Detail

contentback to summary
private final String content

Constructor Detail

Cellback to summary
public Cell(String content, Field field, int columnIndex)

Method Detail

getContentback to summary
public String getContent()
org.jabref.gui.mergeentries.multiwaymerge back to summary

private Class MultiMergeEntriesView.FieldRow

extends Object
Class Inheritance
  • java.lang.Object
  • org.jabref.gui.mergeentries.multiwaymerge.MultiMergeEntriesView.FieldRow

Field Summary

Modifier and TypeField and Description
private com.tobiasdiez.easybind.EasyObservableValue<String>
private final TextInputControl
private final int
public final ToggleGroup

Constructor Summary

AccessConstructor and Description
public
FieldRow(Field field, int rowIndex)

Method Summary

Modifier and TypeMethod and Description
private void
addRow(Field
the field to add to the view as a new row in the table
field
)

Adds a row that represents this field

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fieldBindingback to summary
private com.tobiasdiez.easybind.EasyObservableValue<String> fieldBinding
Annotations
@SuppressWarnings:FieldCanBeLocal
fieldEditorCellback to summary
private final TextInputControl fieldEditorCell
rowIndexback to summary
private final int rowIndex
toggleGroupback to summary
public final ToggleGroup toggleGroup

Constructor Detail

FieldRowback to summary
public FieldRow(Field field, int rowIndex)

Method Detail

addRowback to summary
private void addRow(Field field)

Adds a row that represents this field

Parameters
field:Field

the field to add to the view as a new row in the table