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

<init>

DataContainer(model: ObservableList<M>, factory: (Int, M) -> C, filter: (Int, M) -> Boolean = null, mapping: (List<Pair<Int, M>>) -> List<Pair<Int, M>> = null, container: Container = VPanel(), init: DataContainer<M, C>.() -> Unit = null)

Creates DataContainer bound to given data model.

Parameters

M - data model type

C - visual component type

model - data model of type ObservableList

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

filter - a filtering function

mapping - a mapping function

container - internal container (defaults to VPanel)

init - an initializer extension function

Constructor
Creates DataContainer bound to given data model.