< prev index next >

modules/base/src/main/java/javafx/beans/property/ReadOnlySetWrapper.java

Print this page
rev 9213 : 8089557: bindBidirection works for ReadOnly*Wrapper incorrectly

*** 23,37 **** * questions. */ package javafx.beans.property; - import javafx.beans.InvalidationListener; - import javafx.beans.value.ChangeListener; import javafx.collections.ObservableSet; - import javafx.collections.SetChangeListener; - import static javafx.collections.SetChangeListener.Change; /** * This class provides a convenient class to define read-only properties. It * creates two properties that are synchronized. One property is read-only --- 23,33 ----
*** 102,176 **** /** * {@inheritDoc} */ @Override - public void addListener(InvalidationListener listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(InvalidationListener listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(ChangeListener<? super ObservableSet<E>> listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(ChangeListener<? super ObservableSet<E>> listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void addListener(SetChangeListener<? super E> listener) { - getReadOnlyProperty().addListener(listener); - } - - /** - * {@inheritDoc} - */ - @Override - public void removeListener(SetChangeListener<? super E> listener) { - if (readOnlyProperty != null) { - readOnlyProperty.removeListener(listener); - } - } - - /** - * {@inheritDoc} - */ - @Override protected void fireValueChangedEvent() { if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } } /** * {@inheritDoc} */ @Override protected void fireValueChangedEvent(Change<? extends E> change) { if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(change); } } --- 98,120 ---- /** * {@inheritDoc} */ @Override protected void fireValueChangedEvent() { + super.fireValueChangedEvent(); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(); } } /** * {@inheritDoc} */ @Override protected void fireValueChangedEvent(Change<? extends E> change) { + super.fireValueChangedEvent(change); if (readOnlyProperty != null) { readOnlyProperty.fireValueChangedEvent(change); } }
< prev index next >