kvision / pl.treksoft.kvision.data / DataContainer / <init>

<init>

DataContainer(model: ObservableList<M>, factory: (M, Int, ObservableList<M>) -> C, container: CONT, containerAdd: CONT.(C, M) -> Unit = null, filter: (M) -> Boolean = null, sorter: (M) -> Comparable<*>? = null, sorterType: () -> SorterType = { SorterType.ASC }, init: DataContainer<M, C, CONT>.() -> Unit = null)

Creates DataContainer bound to given data model.

Parameters

M - data model type

C - visual component type

CONT - container type

model - data model of type ObservableList

factory - a function which creates component C from data model at given index

container - internal container

containerAdd - function to add component C to the internal container CONT

filter - a filtering function

sorter - a sorting function

sorterType - a sorting type selection function

init - an initializer extension function

Constructor
Creates DataContainer bound to given data model.