SourceType
- the generic type of the source list.TargetType
- the generic type of the target list.public class ListTransformation<SourceType,TargetType> extends Object
ObservableList
that contains elements of TargetType
to another
ObservableList
that contains elements of SourceType
. This is different to the
normal list binding offered by JavaFX where the lists have to contain elements of the same type.Type | Property and Description |
---|---|
javafx.beans.property.ListProperty<SourceType> |
modelList |
javafx.beans.property.ReadOnlyListProperty<TargetType> |
targetList |
Constructor and Description |
---|
ListTransformation(java.util.function.Function<SourceType,TargetType> function)
Creates a
ListTransformation by with a given function. |
ListTransformation(javafx.collections.ObservableList<SourceType> modelList,
java.util.function.Function<SourceType,TargetType> function)
Creates a
ListTransformation by a given list of items and a function. |
Modifier and Type | Method and Description |
---|---|
javafx.collections.ObservableList<SourceType> |
getModelList() |
javafx.collections.ObservableList<TargetType> |
getTargetList() |
javafx.beans.property.ListProperty<SourceType> |
modelListProperty() |
void |
setModelList(javafx.collections.ObservableList<SourceType> modelList)
Set the model list that should be synchronized with the target list.
|
javafx.beans.property.ReadOnlyListProperty<TargetType> |
targetListProperty() |
public javafx.beans.property.ListProperty<SourceType> modelListProperty
getModelList()
,
setModelList(ObservableList)
public javafx.beans.property.ReadOnlyListProperty<TargetType> targetListProperty
getTargetList()
public ListTransformation(javafx.collections.ObservableList<SourceType> modelList, java.util.function.Function<SourceType,TargetType> function)
ListTransformation
by a given list of items and a function.modelList
- which should be transformed for the UIfunction
- which is used for transformationpublic ListTransformation(java.util.function.Function<SourceType,TargetType> function)
ListTransformation
by with a given function.function
- which is used for transformationpublic javafx.beans.property.ListProperty<SourceType> modelListProperty()
getModelList()
,
setModelList(ObservableList)
public void setModelList(javafx.collections.ObservableList<SourceType> modelList)
modelList
- the source listpublic javafx.collections.ObservableList<SourceType> getModelList()
public javafx.beans.property.ReadOnlyListProperty<TargetType> targetListProperty()
getTargetList()
public javafx.collections.ObservableList<TargetType> getTargetList()
TargetType
representation of modelListProperty()
.Copyright © 2015 Saxonia Systems AG. All rights reserved.