harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r414222 - /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java
Date Wed, 14 Jun 2006 12:31:39 GMT
Author: tellison
Date: Wed Jun 14 05:31:39 2006
New Revision: 414222

URL: http://svn.apache.org/viewvc?rev=414222&view=rev
Log:
Add change event support for indexed properties.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java?rev=414222&r1=414221&r2=414222&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java
Wed Jun 14 05:31:39 2006
@@ -69,8 +69,24 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * TODO
+     * 
+     * @param propertyName
+     * @param index
+     * @param oldValue
+     * @param newValue
      */
+    public void fireIndexedPropertyChange(String propertyName, int index,
+			Object oldValue, Object newValue) {
+
+    	// nulls and equals check done in doFire...
+		doFirePropertyChange(new IndexedPropertyChangeEvent(source,
+				propertyName, oldValue, newValue, index));
+	}
+
+    /**
+	 * @com.intel.drl.spec_ref
+	 */
     public synchronized void removePropertyChangeListener(
             String propertyName, PropertyChangeListener listener) {
         if ( (propertyName != null) && (listener != null) ) {
@@ -128,6 +144,24 @@
         doFirePropertyChange(event);
     }
 
+
+    /**
+     * TODO
+     * 
+     * @param propertyName
+     * @param index
+     * @param oldValue
+     * @param newValue
+     */
+    public void fireIndexedPropertyChange(String propertyName, int index,
+			boolean oldValue, boolean newValue) {
+
+		if (oldValue != newValue) {
+			fireIndexedPropertyChange(propertyName, index,
+					Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
+		}
+	}
+
     /**
      * @com.intel.drl.spec_ref
      */
@@ -137,6 +171,23 @@
                 oldValue, newValue);
         doFirePropertyChange(event);
     }
+
+    /**
+     * TODO
+     * 
+     * @param propertyName
+     * @param index
+     * @param oldValue
+     * @param newValue
+     */
+    public void fireIndexedPropertyChange(String propertyName, int index,
+			int oldValue, int newValue) {
+
+		if (oldValue != newValue) {
+			fireIndexedPropertyChange(propertyName, index,
+					new Integer(oldValue), new Integer(newValue));
+		}
+	}
 
     /**
      * @com.intel.drl.spec_ref



Mime
View raw message