Class ReadOnlyListWrapperEx<E>
java.lang.Object
javafx.beans.binding.ListExpression<E>
javafx.beans.property.ReadOnlyListProperty<E>
javafx.beans.property.ListProperty<E>
javafx.beans.property.ListPropertyBase<E>
javafx.beans.property.SimpleListProperty<E>
javafx.beans.property.ReadOnlyListWrapper<E>
org.eclipse.gef.common.beans.property.ReadOnlyListWrapperEx<E>
- Type Parameters:
E- The element type of the wrappedObservableList.
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>,Observable,Property<ObservableList<E>>,ReadOnlyProperty<ObservableList<E>>,ObservableListValue<E>,ObservableObjectValue<ObservableList<E>>,ObservableValue<ObservableList<E>>,WritableListValue<E>,WritableObjectValue<ObservableList<E>>,WritableValue<ObservableList<E>>,ObservableList<E>
A replacement for
ReadOnlyListWrapper 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.ListPropertyBase
empty, size -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new unnamedReadOnlyListWrapperEx.ReadOnlyListWrapperEx(Object bean, String name) Creates a new namedReadOnlyListWrapperExrelated to the given bean.ReadOnlyListWrapperEx(Object bean, String name, ObservableList<E> initialValue) Creates a new namedReadOnlyListWrapperEx, related to the given bean and provided with the initial value.ReadOnlyListWrapperEx(ObservableList<E> initialValue) Creates a new unnamedReadOnlyListWrapperExwith the given initial value. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(InvalidationListener listener) voidaddListener(ChangeListener<? super ObservableList<E>> listener) voidaddListener(ListChangeListener<? super E> listener) protected voidprotected voidfireValueChangedEvent(ListChangeListener.Change<? extends E> change) inthashCode()voidremoveListener(InvalidationListener listener) voidremoveListener(ChangeListener<? super ObservableList<E>> listener) voidremoveListener(ListChangeListener<? super E> listener) Methods inherited from class javafx.beans.property.SimpleListProperty
getBean, getNameMethods inherited from class javafx.beans.property.ListPropertyBase
bind, emptyProperty, get, invalidated, isBound, set, sizeProperty, toString, unbindMethods inherited from class javafx.beans.property.ListProperty
bindBidirectional, setValue, unbindBidirectionalMethods inherited from class javafx.beans.property.ReadOnlyListProperty
bindContent, bindContentBidirectional, equals, unbindContent, unbindContentBidirectionalMethods inherited from class javafx.beans.binding.ListExpression
add, add, addAll, addAll, addAll, asString, clear, contains, containsAll, get, getSize, getValue, indexOf, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, iterator, lastIndexOf, listExpression, listIterator, listIterator, remove, remove, remove, removeAll, removeAll, retainAll, retainAll, set, setAll, setAll, size, subList, toArray, toArray, valueAt, valueAtMethods 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 java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArrayMethods inherited from interface javafx.collections.ObservableList
addAll, filtered, remove, removeAll, retainAll, setAll, setAll, sorted, sortedMethods inherited from interface javafx.beans.value.ObservableValue
getValueMethods inherited from interface javafx.beans.value.WritableValue
getValue
-
Constructor Details
-
ReadOnlyListWrapperEx
public ReadOnlyListWrapperEx()Creates a new unnamedReadOnlyListWrapperEx. -
ReadOnlyListWrapperEx
Creates a new namedReadOnlyListWrapperExrelated to the given bean.- Parameters:
bean- The bean to relate the to be createdReadOnlyListWrapperExto.name- The name for the to be createdReadOnlyListWrapperEx.
-
ReadOnlyListWrapperEx
Creates a new namedReadOnlyListWrapperEx, related to the given bean and provided with the initial value.- Parameters:
bean- The bean to relate the to be createdReadOnlyListWrapperExto.name- The name for the to be createdReadOnlyListWrapperEx.initialValue- The initial value of the to be createdReadOnlyListWrapperEx.
-
ReadOnlyListWrapperEx
Creates a new unnamedReadOnlyListWrapperExwith the given initial value.- Parameters:
initialValue- The initial value of the to be createdReadOnlyListWrapperEx.
-
-
Method Details
-
addListener
- Specified by:
addListenerin interfaceObservableValue<E>- Overrides:
addListenerin classListPropertyBase<E>
-
addListener
- Specified by:
addListenerin interfaceObservable- Overrides:
addListenerin classListPropertyBase<E>
-
addListener
- Specified by:
addListenerin interfaceObservableList<E>- Overrides:
addListenerin classListPropertyBase<E>
-
fireValueChangedEvent
protected void fireValueChangedEvent()- Overrides:
fireValueChangedEventin classReadOnlyListWrapper<E>
-
fireValueChangedEvent
- Overrides:
fireValueChangedEventin classReadOnlyListWrapper<E>
-
getReadOnlyProperty
- Overrides:
getReadOnlyPropertyin classReadOnlyListWrapper<E>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<E>- Specified by:
hashCodein interfaceList<E>- Overrides:
hashCodein classReadOnlyListProperty<E>
-
removeListener
- Specified by:
removeListenerin interfaceObservableValue<E>- Overrides:
removeListenerin classListPropertyBase<E>
-
removeListener
- Specified by:
removeListenerin interfaceObservable- Overrides:
removeListenerin classListPropertyBase<E>
-
removeListener
- Specified by:
removeListenerin interfaceObservableList<E>- Overrides:
removeListenerin classListPropertyBase<E>
-