aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/java/beans/PropertyChangeSupport.java
diff options
context:
space:
mode:
authorMark Wielaard <mark@gcc.gnu.org>2006-01-17 18:09:40 +0000
committerMark Wielaard <mark@gcc.gnu.org>2006-01-17 18:09:40 +0000
commit2127637945ea6b763966398130e0770fa993c860 (patch)
treec976ca91e3ef0bda3b34b37c0195145638d8d08e /libjava/classpath/java/beans/PropertyChangeSupport.java
parentbcb36c3e02e3bd2843aad1b9888513dfb5d6e337 (diff)
downloadgcc-2127637945ea6b763966398130e0770fa993c860.zip
gcc-2127637945ea6b763966398130e0770fa993c860.tar.gz
gcc-2127637945ea6b763966398130e0770fa993c860.tar.bz2
Imported GNU Classpath 0.20
Imported GNU Classpath 0.20 * Makefile.am (AM_CPPFLAGS): Add classpath/include. * java/nio/charset/spi/CharsetProvider.java: New override file. * java/security/Security.java: Likewise. * sources.am: Regenerated. * Makefile.in: Likewise. From-SVN: r109831
Diffstat (limited to 'libjava/classpath/java/beans/PropertyChangeSupport.java')
-rw-r--r--libjava/classpath/java/beans/PropertyChangeSupport.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/libjava/classpath/java/beans/PropertyChangeSupport.java b/libjava/classpath/java/beans/PropertyChangeSupport.java
index a0e64af..991390b 100644
--- a/libjava/classpath/java/beans/PropertyChangeSupport.java
+++ b/libjava/classpath/java/beans/PropertyChangeSupport.java
@@ -397,6 +397,58 @@ public class PropertyChangeSupport implements Serializable
}
/**
+ * Fire an indexed property change event. This will only fire
+ * an event if the old and new values are not equal and not null.
+ * @param name the name of the property which changed
+ * @param index the index of the property which changed
+ * @param oldValue the old value of the property
+ * @param newValue the new value of the property
+ * @since 1.5
+ */
+ public void fireIndexedPropertyChange(String name, int index,
+ Object oldValue, Object newValue)
+ {
+ // Argument checking is done in firePropertyChange(PropertyChangeEvent) .
+ firePropertyChange(new IndexedPropertyChangeEvent(source, name,
+ oldValue, newValue,
+ index));
+ }
+
+ /**
+ * Fire an indexed property change event. This will only fire
+ * an event if the old and new values are not equal.
+ * @param name the name of the property which changed
+ * @param index the index of the property which changed
+ * @param oldValue the old value of the property
+ * @param newValue the new value of the property
+ * @since 1.5
+ */
+ public void fireIndexedPropertyChange(String name, int index,
+ int oldValue, int newValue)
+ {
+ if (oldValue != newValue)
+ fireIndexedPropertyChange(name, index, Integer.valueOf(oldValue),
+ Integer.valueOf(newValue));
+ }
+
+ /**
+ * Fire an indexed property change event. This will only fire
+ * an event if the old and new values are not equal.
+ * @param name the name of the property which changed
+ * @param index the index of the property which changed
+ * @param oldValue the old value of the property
+ * @param newValue the new value of the property
+ * @since 1.5
+ */
+ public void fireIndexedPropertyChange(String name, int index,
+ boolean oldValue, boolean newValue)
+ {
+ if (oldValue != newValue)
+ fireIndexedPropertyChange(name, index, Boolean.valueOf(oldValue),
+ Boolean.valueOf(newValue));
+ }
+
+ /**
* Tell whether the specified property is being listened on or not. This
* will only return <code>true</code> if there are listeners on all
* properties or if there is a listener specifically on this property.