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

public Class ViewModelListCellFactory<T>

extends Object
implements Callback<ListView<T>, ListCell<T>>
Class Inheritance
All Implemented Interfaces
javafx.util.Callback
Type Parameters
<T>
cell value
Imports
java.util.ArrayList, .HashMap, .List, .Map, java.util.function.BiConsumer, .Supplier, javafx.beans.value.ObservableValue, javafx.css.PseudoClass, javafx.event.Event, javafx.scene.Node, javafx.scene.control.ComboBox, .ContextMenu, .ListCell, .ListView, .Tooltip, javafx.scene.input.DragEvent, .MouseEvent, javafx.scene.paint.Color, javafx.util.Callback, org.jabref.gui.icon.JabRefIcon, org.jabref.logic.util.strings.StringUtil, com.tobiasdiez.easybind.Subscription, de.saxsys.mvvmfx.utils.validation.ValidationStatus

Constructs a ListCell based on the view model of the row and a bunch of specified converter methods.

Field Summary

Modifier and TypeField and Description
private static final PseudoClass
private final Map<PseudoClass, Callback<T, ObservableValue<Boolean>>>
private Supplier<List<String>>
private Callback<T, ContextMenu>
private Callback<T, Node>
private BiConsumer<T, ? super MouseEvent>
private BiConsumer<T, ? super DragEvent>
private BiConsumer<T, ? super DragEvent>
private BiConsumer<T, ? super DragEvent>
private BiConsumer<T, ? super DragEvent>
private BiConsumer<T, ? super DragEvent>
private BiConsumer<T, ? super MouseEvent>
private Callback<T, String>
private Callback<T, Tooltip>
private Callback<T, de.saxsys.mvvmfx.utils.validation.ValidationStatus>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ListCell<T>
call(ListView<T> param)

Implements javafx.util.Callback.call.

The call method is called when required, and is given a single argument of type P, with a requirement that an object of type R is returned.

public void
install(ComboBox<T> comboBox)

public void
install(ListView<T> listView)

public ViewModelListCellFactory<T>
setOnDragDetected(BiConsumer<T, ? super MouseEvent> toOnDragDetected)

public ViewModelListCellFactory<T>
public ViewModelListCellFactory<T>
setOnDragDropped(BiConsumer<T, ? super DragEvent> toOnDragDropped)

public ViewModelListCellFactory<T>
setOnDragEntered(BiConsumer<T, ? super DragEvent> toOnDragEntered)

public ViewModelListCellFactory<T>
setOnDragExited(BiConsumer<T, ? super DragEvent> toOnDragExited)

public ViewModelListCellFactory<T>
setOnDragOver(BiConsumer<T, ? super DragEvent> toOnDragOver)

public ViewModelListCellFactory<T>
public ViewModelListCellFactory<T>
withGraphic(Callback<T, Node> toGraphic)

public ViewModelListCellFactory<T>
public ViewModelListCellFactory<T>
withIcon(Callback<T, JabRefIcon> toIcon, Callback<T, Color> toColor)

public ViewModelListCellFactory<T>
withOnMouseClickedEvent(BiConsumer<T, ? super MouseEvent> toOnMouseClickedEvent)

public ViewModelListCellFactory<T>
public ViewModelListCellFactory<T>
withStringTooltip(Callback<T, String> toStringTooltip)

public ViewModelListCellFactory<T>

Returns:

the factory
withStyleClasses
(Supplier<List<String>>
the supplier that is called only once on the cell
styleClassSupplier
)

Supplies styleClasses that are set on the cell right after creation, only once.

public ViewModelListCellFactory<T>
withText(Callback<T, String> toText)

public ViewModelListCellFactory<T>
withTooltip(Callback<T, Tooltip> toTooltip)

public ViewModelListCellFactory<T>
withValidation(Callback<T, de.saxsys.mvvmfx.utils.validation.ValidationStatus> validationStatusProperty)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INVALID_PSEUDO_CLASSback to summary
private static final PseudoClass INVALID_PSEUDO_CLASS
pseudoClassesback to summary
private final Map<PseudoClass, Callback<T, ObservableValue<Boolean>>> pseudoClasses
styleClassSupplierback to summary
private Supplier<List<String>> styleClassSupplier
toContextMenuback to summary
private Callback<T, ContextMenu> toContextMenu
toGraphicback to summary
private Callback<T, Node> toGraphic
toOnDragDetectedback to summary
private BiConsumer<T, ? super MouseEvent> toOnDragDetected
toOnDragDoneback to summary
private BiConsumer<T, ? super DragEvent> toOnDragDone
toOnDragDroppedback to summary
private BiConsumer<T, ? super DragEvent> toOnDragDropped
toOnDragEnteredback to summary
private BiConsumer<T, ? super DragEvent> toOnDragEntered
toOnDragExitedback to summary
private BiConsumer<T, ? super DragEvent> toOnDragExited
toOnDragOverback to summary
private BiConsumer<T, ? super DragEvent> toOnDragOver
toOnMouseClickedEventback to summary
private BiConsumer<T, ? super MouseEvent> toOnMouseClickedEvent
toTextback to summary
private Callback<T, String> toText
toTooltipback to summary
private Callback<T, Tooltip> toTooltip
validationStatusPropertyback to summary
private Callback<T, de.saxsys.mvvmfx.utils.validation.ValidationStatus> validationStatusProperty

Constructor Detail

ViewModelListCellFactoryback to summary
public ViewModelListCellFactory()

Method Detail

callback to summary
public ListCell<T> call(ListView<T> param)

Implements javafx.util.Callback.call.

Doc from javafx.util.Callback.call.

The call method is called when required, and is given a single argument of type P, with a requirement that an object of type R is returned.

Annotations
@Override
installback to summary
public void install(ComboBox<T> comboBox)
installback to summary
public void install(ListView<T> listView)
setOnDragDetectedback to summary
public ViewModelListCellFactory<T> setOnDragDetected(BiConsumer<T, ? super MouseEvent> toOnDragDetected)
setOnDragDoneback to summary
public ViewModelListCellFactory<T> setOnDragDone(BiConsumer<T, DragEvent> toOnDragDone)
setOnDragDroppedback to summary
public ViewModelListCellFactory<T> setOnDragDropped(BiConsumer<T, ? super DragEvent> toOnDragDropped)
setOnDragEnteredback to summary
public ViewModelListCellFactory<T> setOnDragEntered(BiConsumer<T, ? super DragEvent> toOnDragEntered)
setOnDragExitedback to summary
public ViewModelListCellFactory<T> setOnDragExited(BiConsumer<T, ? super DragEvent> toOnDragExited)
setOnDragOverback to summary
public ViewModelListCellFactory<T> setOnDragOver(BiConsumer<T, ? super DragEvent> toOnDragOver)
withContextMenuback to summary
public ViewModelListCellFactory<T> withContextMenu(Callback<T, ContextMenu> toContextMenu)
withGraphicback to summary
public ViewModelListCellFactory<T> withGraphic(Callback<T, Node> toGraphic)
withIconback to summary
public ViewModelListCellFactory<T> withIcon(Callback<T, JabRefIcon> toIcon)
withIconback to summary
public ViewModelListCellFactory<T> withIcon(Callback<T, JabRefIcon> toIcon, Callback<T, Color> toColor)
withOnMouseClickedEventback to summary
public ViewModelListCellFactory<T> withOnMouseClickedEvent(BiConsumer<T, ? super MouseEvent> toOnMouseClickedEvent)
withPseudoClassback to summary
public ViewModelListCellFactory<T> withPseudoClass(PseudoClass pseudoClass, Callback<T, ObservableValue<Boolean>> toCondition)
withStringTooltipback to summary
public ViewModelListCellFactory<T> withStringTooltip(Callback<T, String> toStringTooltip)
withStyleClassesback to summary
public ViewModelListCellFactory<T> withStyleClasses(Supplier<List<String>> styleClassSupplier)

Supplies styleClasses that are set on the cell right after creation, only once.

Parameters
styleClassSupplier:Supplier<List<String>>

the supplier that is called only once on the cell

Returns:ViewModelListCellFactory<T>

the factory

withTextback to summary
public ViewModelListCellFactory<T> withText(Callback<T, String> toText)
withTooltipback to summary
public ViewModelListCellFactory<T> withTooltip(Callback<T, Tooltip> toTooltip)
withValidationback to summary
public ViewModelListCellFactory<T> withValidation(Callback<T, de.saxsys.mvvmfx.utils.validation.ValidationStatus> validationStatusProperty)