tornadofx / tornadofx / javafx.event.EventTarget / bindChildren

bindChildren

fun <T> EventTarget.bindChildren(sourceList: ObservableList<T>, converter: (T) -> Node): ListConversionListener<T, Node>

Bind the children of this Layout node to the given observable list of items by converting them into nodes via the given converter function. Changes to the source list will be reflected in the children list of this layout node.

fun <T> EventTarget.bindChildren(sourceList: ListProperty<T>, converter: (T) -> Node): ListConversionListener<T, Node>

Bind the children of this Layout node to the items of the given ListPropery by converting them into nodes via the given converter function. Changes to the source list and changing the list inside the ListProperty will be reflected in the children list of this layout node.

inline fun <reified T> EventTarget.bindChildren(sourceSet: ObservableSet<T>, noinline converter: (T) -> Node): SetConversionListener<T, Node>

Bind the children of this Layout node to the given observable set of items by converting them into nodes via the given converter function. Changes to the source set will be reflected in the children list of this layout node.

inline fun <reified K, reified V> EventTarget.bindChildren(sourceMap: ObservableMap<K, V>, noinline converter: (K, V) -> Node): MapConversionListener<K, V, Node>