tornadofx / tornadofx / kotlin.collections.MutableList / bind

bind

fun <SourceType, TargetType> MutableList<TargetType>.bind(sourceList: ObservableList<SourceType>, converter: (SourceType) -> TargetType): ListConversionListener<SourceType, TargetType>
fun <SourceType, TargetType> MutableList<TargetType>.bind(sourceSet: ObservableSet<SourceType>, converter: (SourceType) -> TargetType): SetConversionListener<SourceType, TargetType>

Bind this list to the given observable list by converting them into the correct type via the given converter. Changes to the observable list are synced.

fun <SourceTypeKey, SourceTypeValue, TargetType> MutableList<TargetType>.bind(sourceMap: ObservableMap<SourceTypeKey, SourceTypeValue>, converter: (SourceTypeKey, SourceTypeValue) -> TargetType): MapConversionListener<SourceTypeKey, SourceTypeValue, TargetType>