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:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.List<E>
,javafx.beans.Observable
,javafx.beans.property.Property<javafx.collections.ObservableList<E>>
,javafx.beans.property.ReadOnlyProperty<javafx.collections.ObservableList<E>>
,javafx.beans.value.ObservableListValue<E>
,javafx.beans.value.ObservableObjectValue<javafx.collections.ObservableList<E>>
,javafx.beans.value.ObservableValue<javafx.collections.ObservableList<E>>
,javafx.beans.value.WritableListValue<E>
,javafx.beans.value.WritableObjectValue<javafx.collections.ObservableList<E>>
,javafx.beans.value.WritableValue<javafx.collections.ObservableList<E>>
,javafx.collections.ObservableList<E>
public class ReadOnlyListWrapperEx<E> extends javafx.beans.property.ReadOnlyListWrapper<E>
A replacement forReadOnlyListWrapper
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.
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyListWrapperEx()
Creates a new unnamedReadOnlyListWrapperEx
.ReadOnlyListWrapperEx(java.lang.Object bean, java.lang.String name)
Creates a new namedReadOnlyListWrapperEx
related to the given bean.ReadOnlyListWrapperEx(java.lang.Object bean, java.lang.String name, javafx.collections.ObservableList<E> initialValue)
Creates a new namedReadOnlyListWrapperEx
, related to the given bean and provided with the initial value.ReadOnlyListWrapperEx(javafx.collections.ObservableList<E> initialValue)
Creates a new unnamedReadOnlyListWrapperEx
with the given initial value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(javafx.beans.InvalidationListener listener)
void
addListener(javafx.beans.value.ChangeListener<? super javafx.collections.ObservableList<E>> listener)
void
addListener(javafx.collections.ListChangeListener<? super E> listener)
protected void
fireValueChangedEvent()
protected void
fireValueChangedEvent(javafx.collections.ListChangeListener.Change<? extends E> change)
javafx.beans.property.ReadOnlyListProperty<E>
getReadOnlyProperty()
int
hashCode()
void
removeListener(javafx.beans.InvalidationListener listener)
void
removeListener(javafx.beans.value.ChangeListener<? super javafx.collections.ObservableList<E>> listener)
void
removeListener(javafx.collections.ListChangeListener<? super E> listener)
-
Methods inherited from class javafx.beans.property.ListPropertyBase
bind, emptyProperty, get, invalidated, isBound, set, sizeProperty, toString, unbind
-
Methods inherited from class javafx.beans.property.ListProperty
bindBidirectional, setValue, unbindBidirectional
-
Methods inherited from class javafx.beans.property.ReadOnlyListProperty
bindContent, bindContentBidirectional, equals, unbindContent, unbindContentBidirectional
-
Methods 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, valueAt
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods 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, toArray
-
-
-
-
Constructor Detail
-
ReadOnlyListWrapperEx
public ReadOnlyListWrapperEx()
Creates a new unnamedReadOnlyListWrapperEx
.
-
ReadOnlyListWrapperEx
public ReadOnlyListWrapperEx(java.lang.Object bean, java.lang.String name)
Creates a new namedReadOnlyListWrapperEx
related to the given bean.- Parameters:
bean
- The bean to relate the to be createdReadOnlyListWrapperEx
to.name
- The name for the to be createdReadOnlyListWrapperEx
.
-
ReadOnlyListWrapperEx
public ReadOnlyListWrapperEx(java.lang.Object bean, java.lang.String name, javafx.collections.ObservableList<E> initialValue)
Creates a new namedReadOnlyListWrapperEx
, related to the given bean and provided with the initial value.- Parameters:
bean
- The bean to relate the to be createdReadOnlyListWrapperEx
to.name
- The name for the to be createdReadOnlyListWrapperEx
.initialValue
- The initial value of the to be createdReadOnlyListWrapperEx
.
-
ReadOnlyListWrapperEx
public ReadOnlyListWrapperEx(javafx.collections.ObservableList<E> initialValue)
Creates a new unnamedReadOnlyListWrapperEx
with the given initial value.- Parameters:
initialValue
- The initial value of the to be createdReadOnlyListWrapperEx
.
-
-
Method Detail
-
addListener
public void addListener(javafx.beans.value.ChangeListener<? super javafx.collections.ObservableList<E>> listener)
-
addListener
public void addListener(javafx.beans.InvalidationListener listener)
- Specified by:
addListener
in interfacejavafx.beans.Observable
- Overrides:
addListener
in classjavafx.beans.property.ListPropertyBase<E>
-
addListener
public void addListener(javafx.collections.ListChangeListener<? super E> listener)
-
fireValueChangedEvent
protected void fireValueChangedEvent()
- Overrides:
fireValueChangedEvent
in classjavafx.beans.property.ReadOnlyListWrapper<E>
-
fireValueChangedEvent
protected void fireValueChangedEvent(javafx.collections.ListChangeListener.Change<? extends E> change)
- Overrides:
fireValueChangedEvent
in classjavafx.beans.property.ReadOnlyListWrapper<E>
-
getReadOnlyProperty
public javafx.beans.property.ReadOnlyListProperty<E> getReadOnlyProperty()
- Overrides:
getReadOnlyProperty
in classjavafx.beans.property.ReadOnlyListWrapper<E>
-
hashCode
public int hashCode()
-
removeListener
public void removeListener(javafx.beans.value.ChangeListener<? super javafx.collections.ObservableList<E>> listener)
-
removeListener
public void removeListener(javafx.beans.InvalidationListener listener)
- Specified by:
removeListener
in interfacejavafx.beans.Observable
- Overrides:
removeListener
in classjavafx.beans.property.ListPropertyBase<E>
-
-