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

public Class SpecialFieldEditor

extends HBox
implements FieldEditorFX
Class Inheritance
All Implemented Interfaces
org.jabref.gui.fieldeditors.FieldEditorFX
Annotations
@NullMarked
Imports
java.util.ArrayList, .List, .Optional, java.util.function.Consumer, javafx.beans.value.ObservableValue, javafx.geometry.Pos, javafx.scene.Parent, javafx.scene.control.ToggleButton, .ToggleGroup, .Tooltip, javafx.scene.input.MouseButton, .MouseEvent, javafx.scene.layout.HBox, org.jabref.gui.icon.JabRefIcon, org.jabref.gui.specialfields.SpecialFieldValueViewModel, .SpecialFieldViewModel, org.jabref.gui.util.UiTaskExecutor, org.jabref.logic.preferences.CliPreferences, org.jabref.logic.undo.UndoManager, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.SpecialField, .SpecialFieldValue, com.tobiasdiez.easybind.EasyBind, org.controlsfx.control.Rating, org.jspecify.annotations.NullMarked, .Nullable

Editor offering the same icon-based selection for SpecialFields as the main table's special field columns (org.jabref.gui.maintable.columns.SpecialFieldColumn): a star Rating for the ranking, a single toggle for the one-value fields (printed, quality, relevance), and one toggle per value for priority and read status.

Field Summary

Modifier and TypeField and Description
private @Nullable BibEntry
entry

Null until bindToEntry runs; the control listeners fire once on construction (before binding) and again for every value pushed into a control, so they must tolerate no entry.

private @Nullable ObservableValue<Optional<String>>
fieldValue

Retained only to keep the field binding alive: BibEntry holds its bindings weakly.

private final SpecialField
private boolean
updatingControls

Distinguishes programmatic control updates (driven by the field binding) from user input.

private final Consumer<Optional<SpecialFieldValue>>
valueApplier

Pushes a stored field value into whichever control this editor built, so the varying control types don't have to be kept as separate (mostly-null) fields.

private final SpecialFieldViewModel

Constructor Summary

AccessConstructor and Description
public
SpecialFieldEditor(SpecialField specialField, CliPreferences preferences, UndoManager undoManager)

Method Summary

Modifier and TypeMethod and Description
private void
public void
private SpecialFieldValue
private Rating
private ToggleButton
private List<ToggleButton>
public Parent
Inherited from javafx.scene.layout.HBox:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthfillHeightPropertygetAlignmentgetBaselineOffsetgetClassCssMetaDatagetContentBiasgetCssMetaDatagetHgrowgetMargingetSpacingisFillHeightlayoutChildrenrequestLayoutsetAlignmentsetFillHeightsetHgrowsetMarginsetSpacingspacingProperty

Field Detail

entryback to summary
private @Nullable BibEntry entry

Null until bindToEntry runs; the control listeners fire once on construction (before binding) and again for every value pushed into a control, so they must tolerate no entry.

fieldValueback to summary
private @Nullable ObservableValue<Optional<String>> fieldValue

Retained only to keep the field binding alive: BibEntry holds its bindings weakly.

specialFieldback to summary
private final SpecialField specialField
updatingControlsback to summary
private boolean updatingControls

Distinguishes programmatic control updates (driven by the field binding) from user input.

valueApplierback to summary
private final Consumer<Optional<SpecialFieldValue>> valueApplier

Pushes a stored field value into whichever control this editor built, so the varying control types don't have to be kept as separate (mostly-null) fields.

viewModelback to summary
private final SpecialFieldViewModel viewModel

Constructor Detail

SpecialFieldEditorback to summary
public SpecialFieldEditor(SpecialField specialField, CliPreferences preferences, UndoManager undoManager)

Method Detail

applyValueback to summary
private void applyValue(Optional<SpecialFieldValue> value)
bindToEntryback to summary
public void bindToEntry(BibEntry entry)

Implements org.jabref.gui.fieldeditors.FieldEditorFX.bindToEntry.

Annotations
@Override
clearValueback to summary
private SpecialFieldValue clearValue()
createRatingControlback to summary
private Rating createRatingControl()
createToggleControlback to summary
private ToggleButton createToggleControl()
createToggleGroupControlsback to summary
private List<ToggleButton> createToggleGroupControls(ToggleGroup group)
getNodeback to summary
public Parent getNode()

Implements org.jabref.gui.fieldeditors.FieldEditorFX.getNode.

Annotations
@Override