public final class CollectionBindings extends Object
| Modifier and Type | Method and Description |
|---|---|
static <S,T> void |
bindContent(List<T> targetList,
ObservableList<? extends S> sourceList,
Function<? super S,? extends T> mapper)
Binds the content of one list to the content of an observable list with possibly transformed elements.
|
static <S,T> void |
bindTreeContent(List<T> targetList,
Function<? super T,? extends List<T>> targetChildListExtractor,
ObservableList<? extends S> sourceList,
Function<? super S,? extends ObservableList<? extends S>> sourceChildListExtractor,
Function<? super S,? extends T> mapper)
Binds the content of a tree (deeply nested list) to the content of an observable tree with possibly transformed elements.
|
static <S,T> void |
unbindContent(List<T> targetList,
ObservableList<? extends S> sourceList)
Unbinds the content of a bound list.
|
static <S,T> void |
unbindTreeContent(List<T> targetList,
Function<? super T,? extends List<T>> targetChildListExtractor,
ObservableList<? extends S> sourceList,
Function<? super S,? extends ObservableList<? extends S>> sourceChildListExtractor)
Unbinds the content of a bound tree (deeply nested list).
|
public static <S,T> void bindContent(List<T> targetList, ObservableList<? extends S> sourceList, Function<? super S,? extends T> mapper)
S - the type of the elements of the source listT - the type of the elements of the target listtargetList - the target listsourceList - the observalble source listmapper - a mapper function to map the elements from the source list to the elements of the target listpublic static <S,T> void unbindContent(List<T> targetList, ObservableList<? extends S> sourceList)
S - the type of the elements of the source listT - the type of the elements of the target listtargetList - the target listsourceList - the observalble source listpublic static <S,T> void bindTreeContent(List<T> targetList, Function<? super T,? extends List<T>> targetChildListExtractor, ObservableList<? extends S> sourceList, Function<? super S,? extends ObservableList<? extends S>> sourceChildListExtractor, Function<? super S,? extends T> mapper)
S - the type of the elements of the source treeT - the type of the elements of the target treetargetList - the target treetargetChildListExtractor - an extractor to get a child list in the target treesourceList - the observalble source treesourceChildListExtractor - an extractor to get a child list in the source treemapper - a mapper function to map the elements from the source tree to the elements of the target treepublic static <S,T> void unbindTreeContent(List<T> targetList, Function<? super T,? extends List<T>> targetChildListExtractor, ObservableList<? extends S> sourceList, Function<? super S,? extends ObservableList<? extends S>> sourceChildListExtractor)
S - the type of the elements of the source treeT - the type of the elements of the target treetargetList - the target treetargetChildListExtractor - an extractor to get a child list in the target treesourceList - the observalble source treesourceChildListExtractor - an extractor to get a child list in the source treeCopyright © 2012–2019 Drombler. All rights reserved.