Class CellFactory<T, C extends VFXCell<T>>

java.lang.Object
io.github.palexdev.virtualizedfx.properties.CellFactory<T,C>
All Implemented Interfaces:
Observable, Property<Function<T,C>>, ReadOnlyProperty<Function<T,C>>, ObservableValue<Function<T,C>>, WritableValue<Function<T,C>>

public class CellFactory<T, C extends VFXCell<T>> extends Object implements Property<Function<T,C>>
A wrapper for cell creation functions used by virtualized containers.

Encapsulates a cell generation function (create(Object)) along with a reference to the VFXContext of the container that uses the factory.

This allows each created cell to access the container's context upon creation. In other words, this wrapper is an easy way to provide all cells the container's instance as well as additional services without radical API changes.

Note 1: nothing prevents you from creating cells using the function directly, however, keep in mind that to automatically make use of the new VFXCell.onCreated(VFXContext) hook, you must use create(Object) instead.

Note 2: for convenience this extends Property and delegates the implemented methods to the wrapped cell factory property.