< 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,15 +23,11 @@
  * 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

@@ -102,75 +98,23 @@
 
     /**
      * {@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() {
+        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 >