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

public Class ViewModelTreeTableCellFactory<S>

extends Object
implements Callback<TreeTableColumn<S, S>, TreeTableCell<S, S>>
Class Inheritance
All Implemented Interfaces
javafx.util.Callback
Type Parameters
<S>
view model
Imports
java.util.List, java.util.function.Supplier, javafx.event.EventHandler, javafx.scene.Node, javafx.scene.control.Tooltip, .TreeTableCell, .TreeTableColumn, javafx.scene.input.MouseEvent, javafx.util.Callback, org.jabref.gui.icon.JabRefIcon, org.jabref.logic.util.strings.StringUtil, org.jspecify.annotations.Nullable

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

Field Summary

Modifier and TypeField and Description
private Supplier<List<String>>
private Callback<S, Node>
private Callback<S, EventHandler<? super MouseEvent>>
private Callback<S, String>
private Callback<S, @Nullable String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public TreeTableCell<S, S>
call(TreeTableColumn<S, S> 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(TreeTableColumn<S, S> column)

public ViewModelTreeTableCellFactory<S>
withGraphic(Callback<S, Node> toGraphic)

public ViewModelTreeTableCellFactory<S>
public ViewModelTreeTableCellFactory<S>
withOnMouseClickedEvent(Callback<S, EventHandler<? super MouseEvent>> toOnMouseClickedEvent)

public ViewModelTreeTableCellFactory<S>

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 ViewModelTreeTableCellFactory<S>
withText(Callback<S, String> toText)

public ViewModelTreeTableCellFactory<S>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

styleClassSupplierback to summary
private Supplier<List<String>> styleClassSupplier
toGraphicback to summary
private Callback<S, Node> toGraphic
toOnMouseClickedEventback to summary
private Callback<S, EventHandler<? super MouseEvent>> toOnMouseClickedEvent
toTextback to summary
private Callback<S, String> toText
toTooltipback to summary
private Callback<S, @Nullable String> toTooltip

Constructor Detail

ViewModelTreeTableCellFactoryback to summary
public ViewModelTreeTableCellFactory()

Method Detail

callback to summary
public TreeTableCell<S, S> call(TreeTableColumn<S, S> 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(TreeTableColumn<S, S> column)
withGraphicback to summary
public ViewModelTreeTableCellFactory<S> withGraphic(Callback<S, Node> toGraphic)
withIconback to summary
public ViewModelTreeTableCellFactory<S> withIcon(Callback<S, JabRefIcon> toIcon)
withOnMouseClickedEventback to summary
public ViewModelTreeTableCellFactory<S> withOnMouseClickedEvent(Callback<S, EventHandler<? super MouseEvent>> toOnMouseClickedEvent)
withStyleClassesback to summary
public ViewModelTreeTableCellFactory<S> 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:ViewModelTreeTableCellFactory<S>

the factory

withTextback to summary
public ViewModelTreeTableCellFactory<S> withText(Callback<S, String> toText)
withTooltipback to summary
public ViewModelTreeTableCellFactory<S> withTooltip(Callback<S, @Nullable String> toTooltip)