Top Inners Fields Constructors Methods
org.jabref.gui.mergeentries.newmergedialog

public Class FieldRowViewModel

extends Object
Class Inheritance
Imports
javax.swing.undo.AbstractUndoableEdit, .CannotRedoException, .CannotUndoException, .CompoundEdit, javafx.beans.binding.Bindings, .BooleanBinding, javafx.beans.property.BooleanProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleObjectProperty, .SimpleStringProperty, .StringProperty, org.jabref.gui.mergeentries.newmergedialog.fieldsmerger.FieldMerger, .FieldMergerFactory, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.Field, .InternalField, org.jabref.model.entry.types.EntryTypeFactory, org.jabref.model.strings.StringUtil, com.tobiasdiez.easybind.EasyBind, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
public static enum

Field Summary

Modifier and TypeField and Description
private final Field
private final FieldMergerFactory
private final CompoundEdit
private final BooleanBinding
private final BooleanProperty
private final BibEntry
private final StringProperty
private final Logger
private final BibEntry
private final StringProperty
private final BibEntry
private final StringProperty
private final ObjectProperty<FieldRowViewModel.Selection>

Constructor Summary

AccessConstructor and Description
public
FieldRowViewModel(Field field, BibEntry leftEntry, BibEntry rightEntry, BibEntry mergedEntry, FieldMergerFactory fieldMergerFactory)

Method Summary

Modifier and TypeMethod and Description
public Field
public BibEntry
public String
public BibEntry
public String
public BibEntry
public String
public FieldRowViewModel.Selection
public BooleanBinding
public boolean
public boolean
public BooleanProperty
public StringProperty
public StringProperty
public void
public StringProperty
public ObjectProperty<FieldRowViewModel.Selection>
public void
public void
public void
public void
public void
setIsFieldsMerged(boolean isFieldsMerged)

public void
setLeftFieldValue(String leftFieldValue)

public void
setMergedFieldValue(String mergedFieldValue)

public void
setRightFieldValue(String rightFieldValue)

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fieldback to summary
private final Field field
fieldMergerFactoryback to summary
private final FieldMergerFactory fieldMergerFactory
fieldsMergedEditback to summary
private final CompoundEdit fieldsMergedEdit
hasEqualLeftAndRightback to summary
private final BooleanBinding hasEqualLeftAndRight
isFieldsMergedback to summary
private final BooleanProperty isFieldsMerged
leftEntryback to summary
private final BibEntry leftEntry
leftFieldValueback to summary
private final StringProperty leftFieldValue
LOGGERback to summary
private final Logger LOGGER
mergedEntryback to summary
private final BibEntry mergedEntry
mergedFieldValueback to summary
private final StringProperty mergedFieldValue
rightEntryback to summary
private final BibEntry rightEntry
rightFieldValueback to summary
private final StringProperty rightFieldValue
selectionback to summary
private final ObjectProperty<FieldRowViewModel.Selection> selection

Constructor Detail

FieldRowViewModelback to summary
public FieldRowViewModel(Field field, BibEntry leftEntry, BibEntry rightEntry, BibEntry mergedEntry, FieldMergerFactory fieldMergerFactory)

Method Detail

getFieldback to summary
public Field getField()
getLeftEntryback to summary
public BibEntry getLeftEntry()
getLeftFieldValueback to summary
public String getLeftFieldValue()
getMergedEntryback to summary
public BibEntry getMergedEntry()
getMergedFieldValueback to summary
public String getMergedFieldValue()
getRightEntryback to summary
public BibEntry getRightEntry()
getRightFieldValueback to summary
public String getRightFieldValue()
getSelectionback to summary
public FieldRowViewModel.Selection getSelection()
hasEqualLeftAndRightBindingback to summary
public BooleanBinding hasEqualLeftAndRightBinding()
hasEqualLeftAndRightValuesback to summary
public boolean hasEqualLeftAndRightValues()
isFieldsMergedback to summary
public boolean isFieldsMerged()
isFieldsMergedPropertyback to summary
public BooleanProperty isFieldsMergedProperty()
leftFieldValuePropertyback to summary
public StringProperty leftFieldValueProperty()
mergedFieldValuePropertyback to summary
public StringProperty mergedFieldValueProperty()
mergeFieldsback to summary
public void mergeFields()
rightFieldValuePropertyback to summary
public StringProperty rightFieldValueProperty()
selectionPropertyback to summary
public ObjectProperty<FieldRowViewModel.Selection> selectionProperty()
selectLeftValueback to summary
public void selectLeftValue()
selectNoneback to summary
public void selectNone()
selectNonEmptyValueback to summary
public void selectNonEmptyValue()
selectRightValueback to summary
public void selectRightValue()
setIsFieldsMergedback to summary
public void setIsFieldsMerged(boolean isFieldsMerged)
setLeftFieldValueback to summary
public void setLeftFieldValue(String leftFieldValue)
setMergedFieldValueback to summary
public void setMergedFieldValue(String mergedFieldValue)
setRightFieldValueback to summary
public void setRightFieldValue(String rightFieldValue)
setSelectionback to summary
public void setSelection(FieldRowViewModel.Selection select)
unmergeFieldsback to summary
public void unmergeFields()
org.jabref.gui.mergeentries.newmergedialog back to summary

pack-priv Class FieldRowViewModel.MergeFieldsUndo

extends AbstractUndoableEdit
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final String
Inherited from javax.swing.undo.AbstractUndoableEdit:
RedoNameUndoName

Constructor Summary

AccessConstructor and Description
pack-priv
MergeFieldsUndo(String oldLeft, String oldRight, String mergedFields)

Method Summary

Modifier and TypeMethod and Description
public void
redo()

Overrides javax.swing.undo.AbstractUndoableEdit.redo.

Implements javax.swing.undo.UndoableEdit.redo.

Throws CannotRedoException if canRedo returns false.

public void
undo()

Overrides javax.swing.undo.AbstractUndoableEdit.undo.

Implements javax.swing.undo.UndoableEdit.undo.

Throws CannotUndoException if canUndo returns false.

Inherited from javax.swing.undo.AbstractUndoableEdit:
addEditcanRedocanUndodiegetPresentationNamegetRedoPresentationNamegetUndoPresentationNameisSignificantreplaceEdittoString

Field Detail

mergedFieldsback to summary
private final String mergedFields
oldLeftback to summary
private final String oldLeft
oldRightback to summary
private final String oldRight

Constructor Detail

MergeFieldsUndoback to summary
pack-priv MergeFieldsUndo(String oldLeft, String oldRight, String mergedFields)

Method Detail

redoback to summary
public void redo() throws CannotRedoException

Overrides javax.swing.undo.AbstractUndoableEdit.redo.

Implements javax.swing.undo.UndoableEdit.redo.

Doc from javax.swing.undo.AbstractUndoableEdit.redo.

Throws CannotRedoException if canRedo returns false. Sets hasBeenDone to true. Subclasses should override to redo the operation represented by this edit. Override should begin with a call to super.

Annotations
@Override
Exceptions
CannotRedoException:
if canRedo returns false
undoback to summary
public void undo() throws CannotUndoException

Overrides javax.swing.undo.AbstractUndoableEdit.undo.

Implements javax.swing.undo.UndoableEdit.undo.

Doc from javax.swing.undo.AbstractUndoableEdit.undo.

Throws CannotUndoException if canUndo returns false. Sets hasBeenDone to false. Subclasses should override to undo the operation represented by this edit. Override should begin with a call to super.

Annotations
@Override
Exceptions
CannotUndoException:
if canUndo returns false
org.jabref.gui.mergeentries.newmergedialog back to summary

public final Enum FieldRowViewModel.Selection

extends Enum<FieldRowViewModel.Selection>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final FieldRowViewModel.Selection
public static final FieldRowViewModel.Selection
NONE

When the user types something into the merged field value and neither the left nor right values match it, NONE is selected

public static final FieldRowViewModel.Selection

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static FieldRowViewModel.Selection
public static FieldRowViewModel.Selection[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

LEFTback to summary
public static final FieldRowViewModel.Selection LEFT
NONEback to summary
public static final FieldRowViewModel.Selection NONE

When the user types something into the merged field value and neither the left nor right values match it, NONE is selected

RIGHTback to summary
public static final FieldRowViewModel.Selection RIGHT

Constructor Detail

Selectionback to summary
private Selection()

Method Detail

valueOfback to summary
public static FieldRowViewModel.Selection valueOf(String name)
valuesback to summary
public static FieldRowViewModel.Selection[] values()