Class ReadOnlySetWrapperEx<E>
java.lang.Object
javafx.beans.binding.SetExpression<E>
javafx.beans.property.ReadOnlySetProperty<E>
javafx.beans.property.SetProperty<E>
javafx.beans.property.SetPropertyBase<E>
javafx.beans.property.SimpleSetProperty<E>
javafx.beans.property.ReadOnlySetWrapper<E>
org.eclipse.gef.common.beans.property.ReadOnlySetWrapperEx<E>
- Type Parameters:
E- The element type of the wrappedObservableSet.
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>,Observable,Property<ObservableSet<E>>,ReadOnlyProperty<ObservableSet<E>>,ObservableObjectValue<ObservableSet<E>>,ObservableSetValue<E>,ObservableValue<ObservableSet<E>>,WritableObjectValue<ObservableSet<E>>,WritableSetValue<E>,WritableValue<ObservableSet<E>>,ObservableSet<E>
A replacement for
ReadOnlySetWrapper to fix the following JavaFX
issues:
- Change notifications are fired even when the observed value did not change.(https://bugs.openjdk.java.net/browse/JDK-8089169)
- Bidirectional binding not working (https://bugs.openjdk.java.net/browse/JDK-8089557): fixed by not forwarding listeners to the nested read-only property but rather keeping the lists of listeners distinct.
-
Property Summary
Properties inherited from class javafx.beans.property.SetPropertyBase
empty, size -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new unnamedReadOnlySetWrapperEx.ReadOnlySetWrapperEx(Object bean, String name) Creates a new namedReadOnlySetWrapperExrelated to the given bean.ReadOnlySetWrapperEx(Object bean, String name, ObservableSet<E> initialValue) Creates a new namedReadOnlySetWrapperEx, related to the given bean and provided with the initial value.ReadOnlySetWrapperEx(ObservableSet<E> initialValue) Creates a new unnamedReadOnlySetWrapperExwith the given initial value. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(InvalidationListener listener) voidaddListener(ChangeListener<? super ObservableSet<E>> listener) voidaddListener(SetChangeListener<? super E> listener) protected voidprotected voidfireValueChangedEvent(SetChangeListener.Change<? extends E> change) inthashCode()voidremoveListener(InvalidationListener listener) voidremoveListener(ChangeListener<? super ObservableSet<E>> listener) voidremoveListener(SetChangeListener<? super E> listener) Methods inherited from class javafx.beans.property.SimpleSetProperty
getBean, getNameMethods inherited from class javafx.beans.property.SetPropertyBase
bind, emptyProperty, get, invalidated, isBound, set, sizeProperty, toString, unbindMethods inherited from class javafx.beans.property.SetProperty
bindBidirectional, setValue, unbindBidirectionalMethods inherited from class javafx.beans.property.ReadOnlySetProperty
bindContent, bindContentBidirectional, equals, unbindContent, unbindContentBidirectionalMethods inherited from class javafx.beans.binding.SetExpression
add, addAll, asString, clear, contains, containsAll, getSize, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, iterator, remove, removeAll, retainAll, setExpression, size, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface javafx.beans.value.ObservableValue
getValueMethods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayMethods inherited from interface javafx.beans.value.WritableValue
getValue
-
Constructor Details
-
ReadOnlySetWrapperEx
public ReadOnlySetWrapperEx()Creates a new unnamedReadOnlySetWrapperEx. -
ReadOnlySetWrapperEx
Creates a new namedReadOnlySetWrapperExrelated to the given bean.- Parameters:
bean- The bean to relate the to be createdReadOnlySetWrapperExto.name- The name for the to be createdReadOnlySetWrapperEx.
-
ReadOnlySetWrapperEx
Creates a new namedReadOnlySetWrapperEx, related to the given bean and provided with the initial value.- Parameters:
bean- The bean to relate the to be createdReadOnlySetWrapperExto.name- The name for the to be createdReadOnlySetWrapperEx.initialValue- The initial value of the to be createdReadOnlySetWrapperEx.
-
ReadOnlySetWrapperEx
Creates a new unnamedReadOnlySetWrapperExwith the given initial value.- Parameters:
initialValue- The initial value of the to be createdReadOnlySetWrapperEx.
-
-
Method Details
-
addListener
- Specified by:
addListenerin interfaceObservableValue<E>- Overrides:
addListenerin classSetPropertyBase<E>
-
addListener
- Specified by:
addListenerin interfaceObservable- Overrides:
addListenerin classSetPropertyBase<E>
-
addListener
- Specified by:
addListenerin interfaceObservableSet<E>- Overrides:
addListenerin classSetPropertyBase<E>
-
fireValueChangedEvent
protected void fireValueChangedEvent()- Overrides:
fireValueChangedEventin classReadOnlySetWrapper<E>
-
fireValueChangedEvent
- Overrides:
fireValueChangedEventin classReadOnlySetWrapper<E>
-
getReadOnlyProperty
- Overrides:
getReadOnlyPropertyin classReadOnlySetWrapper<E>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<E>- Specified by:
hashCodein interfaceSet<E>- Overrides:
hashCodein classReadOnlySetProperty<E>
-
removeListener
- Specified by:
removeListenerin interfaceObservableValue<E>- Overrides:
removeListenerin classSetPropertyBase<E>
-
removeListener
- Specified by:
removeListenerin interfaceObservable- Overrides:
removeListenerin classSetPropertyBase<E>
-
removeListener
- Specified by:
removeListenerin interfaceObservableSet<E>- Overrides:
removeListenerin classSetPropertyBase<E>
-