Class BindingUtils
java.lang.Object
org.eclipse.gef.common.beans.binding.BindingUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> voidbindContent(Multiset<E> source, ObservableMultiset<? extends E> target) Creates a unidirectional content binding from the given sourceMultisetto the given targetObservableMultiset.static <K,V> void bindContent(SetMultimap<K, V> source, ObservableSetMultimap<? extends K, ? extends V> target) Creates a unidirectional content binding from the given sourceSetMultimapto the given targetObservableSetMultimap.static <E> voidbindContentBidirectional(ObservableMultiset<E> source, ObservableMultiset<E> target) Creates a bidirectional content binding between the givenObservableMultisets.static <K,V> void bindContentBidirectional(ObservableSetMultimap<K, V> source, ObservableSetMultimap<K, V> target) Creates a unidirectional content binding between the givenObservableSetMultimaps.static <E> voidunbindContent(Multiset<E> source, ObservableMultiset<? extends E> target) Removes an existing content binding from the given sourceMultisetto the given targetObservableMultiset.static <K,V> void unbindContent(SetMultimap<K, V> source, ObservableSetMultimap<? extends K, ? extends V> target) Removes an existing unidirectional content binding from the given sourceSetMultimapto the given targetObservableSetMultimap.static <E> voidunbindContentBidirectional(ObservableMultiset<E> multiset1, ObservableMultiset<E> multiset2) Removes a bidirectional content binding between the givenObservableMultisets. .static <K,V> void unbindContentBidirectional(ObservableSetMultimap<K, V> source, ObservableSetMultimap<K, V> target) Removes a bidirectional content binding between the givenObservableSetMultimaps.static <K,V> javafx.beans.binding.SetBinding<V> valuesAt(ObservableSetMultimap<K, V> setMultimap, javafx.beans.value.ObservableValue<K> key) Creates a newObjectBindingthat contains the values mapped to the specified key.static <K,V> javafx.beans.binding.SetBinding<V> valuesAt(ObservableSetMultimap<K, V> setMultimap, K key) Creates a newObjectBindingthat contains the values mapped to the specified key.
-
Constructor Details
-
BindingUtils
public BindingUtils()
-
-
Method Details
-
bindContent
Creates a unidirectional content binding from the given sourceMultisetto the given targetObservableMultiset.- Type Parameters:
E- The element type of the givenMultisetandObservableMultiset.- Parameters:
source- TheMultisetwhose content to update when the givenObservableMultisetchanges.target- TheObservableMultisetwhose content is to be observed.
-
bindContent
public static <K,V> void bindContent(SetMultimap<K, V> source, ObservableSetMultimap<? extends K, ? extends V> target) Creates a unidirectional content binding from the given sourceSetMultimapto the given targetObservableSetMultimap.- Type Parameters:
K- The key type of the givenSetMultimapandObservableSetMultimap.V- The value type of the givenSetMultimapandObservableSetMultimap.- Parameters:
source- TheSetMultimapwhose content to update when the givenObservableSetMultimapchanges.target- TheObservableSetMultimapwhose content is to be observed.
-
bindContentBidirectional
public static <E> void bindContentBidirectional(ObservableMultiset<E> source, ObservableMultiset<E> target) Creates a bidirectional content binding between the givenObservableMultisets.- Type Parameters:
E- The element type of the givenObservableMultisets.- Parameters:
source- The first participant of the bidirectional binding. Its contents will be initially replaced with that of the second participant before both are synchronized.target- The second participant of the bidirectional binding. Its contents will be initially taken to update the contents of the first participant before both are synchronized.
-
bindContentBidirectional
public static <K,V> void bindContentBidirectional(ObservableSetMultimap<K, V> source, ObservableSetMultimap<K, V> target) Creates a unidirectional content binding between the givenObservableSetMultimaps.- Type Parameters:
K- The key type of the givenObservableSetMultimaps.V- The value type of the givenObservableSetMultimaps.- Parameters:
source- The first participant of the bidirectional binding. Its contents will be initially replaced with that of the second participant before both are synchronized.target- The second participant of the bidirectional binding. Its contents will be initially taken to update the contents of the first participant before both are synchronized.
-
unbindContent
Removes an existing content binding from the given sourceMultisetto the given targetObservableMultiset.- Type Parameters:
E- The element types of theMultisetandObservableMultiset.- Parameters:
source- TheMultisetwhose content should no longer be updated when the givenObservableMultisetchanges.target- TheObservableMultisetwhose content is no longer to be observed.
-
unbindContent
public static <K,V> void unbindContent(SetMultimap<K, V> source, ObservableSetMultimap<? extends K, ? extends V> target) Removes an existing unidirectional content binding from the given sourceSetMultimapto the given targetObservableSetMultimap.- Type Parameters:
K- The key type of the givenSetMultimapandObservableSetMultimap.V- The value type of the givenSetMultimapandObservableSetMultimap.- Parameters:
source- TheSetMultimapwhose content is no longer to update when the givenObservableSetMultimapchanges.target- TheObservableSetMultimapwhose content is no longer to be observed.
-
unbindContentBidirectional
public static <E> void unbindContentBidirectional(ObservableMultiset<E> multiset1, ObservableMultiset<E> multiset2) Removes a bidirectional content binding between the givenObservableMultisets. .- Type Parameters:
E- The element type of the givenObservableMultisets.- Parameters:
multiset1- The first participant of the bidirectional binding.multiset2- The second participant of the bidirectional binding.
-
unbindContentBidirectional
public static <K,V> void unbindContentBidirectional(ObservableSetMultimap<K, V> source, ObservableSetMultimap<K, V> target) Removes a bidirectional content binding between the givenObservableSetMultimaps.- Type Parameters:
K- The key type of the givenObservableSetMultimaps.V- The value type of the givenObservableSetMultimaps.- Parameters:
source- The first participant of the bidirectional binding.target- The second participant of the bidirectional binding.
-
valuesAt
public static <K,V> javafx.beans.binding.SetBinding<V> valuesAt(ObservableSetMultimap<K, V> setMultimap, K key) Creates a newObjectBindingthat contains the values mapped to the specified key.- Type Parameters:
K- The key type of theObservableSetMultimap.V- The value type of theObservableSetMultimap.- Parameters:
setMultimap- TheObservableSetMultimapfrom which the values are to be retrieved.key- the key of the mapping- Returns:
- A new
ObjectBinding.
-
valuesAt
public static <K,V> javafx.beans.binding.SetBinding<V> valuesAt(ObservableSetMultimap<K, V> setMultimap, javafx.beans.value.ObservableValue<K> key) Creates a newObjectBindingthat contains the values mapped to the specified key.- Type Parameters:
K- The key type of theObservableSetMultimap.V- The value type of theObservableSetMultimap.- Parameters:
setMultimap- TheObservableSetMultimapfrom which the values are to be retrieved.key- the key of the mapping- Returns:
- A new
ObjectBinding.
-