/[classpath]/classpath/java/beans/PropertyChangeSupport.java
ViewVC logotype

Diff of /classpath/java/beans/PropertyChangeSupport.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8.2.3 by gnu_andrew, Tue Aug 2 20:12:16 2005 UTC revision 1.8.2.4 by gnu_andrew, Sun Nov 27 21:00:37 2005 UTC
# Line 397  public class PropertyChangeSupport imple Line 397  public class PropertyChangeSupport imple
397    }    }
398    
399    /**    /**
400       * Fire an indexed property change event.  This will only fire
401       * an event if the old and new values are not equal and not null.
402       * @param name the name of the property which changed
403       * @param index the index of the property which changed
404       * @param oldValue the old value of the property
405       * @param newValue the new value of the property
406       * @since 1.5
407       */
408      public void fireIndexedPropertyChange(String name, int index,
409                                            Object oldValue, Object newValue)
410      {
411        // FIXME: should we use equals() here?
412        if (oldValue == newValue && oldValue != null)
413          firePropertyChange(new IndexedPropertyChangeEvent(source, name,
414                                                            oldValue, newValue,
415                                                            index));
416      }
417    
418      /**
419       * Fire an indexed property change event.  This will only fire
420       * an event if the old and new values are not equal.
421       * @param name the name of the property which changed
422       * @param index the index of the property which changed
423       * @param oldValue the old value of the property
424       * @param newValue the new value of the property
425       * @since 1.5
426       */
427      public void fireIndexedPropertyChange(String name, int index,
428                                            int oldValue, int newValue)
429      {
430        if (oldValue != newValue)
431          fireIndexedPropertyChange(name, index, Integer.valueOf(oldValue),
432                                    Integer.valueOf(newValue));
433      }
434    
435      /**
436       * Fire an indexed property change event.  This will only fire
437       * an event if the old and new values are not equal.
438       * @param name the name of the property which changed
439       * @param index the index of the property which changed
440       * @param oldValue the old value of the property
441       * @param newValue the new value of the property
442       * @since 1.5
443       */
444      public void fireIndexedPropertyChange(String name, int index,
445                                            boolean oldValue, boolean newValue)
446      {
447        if (oldValue != newValue)
448          fireIndexedPropertyChange(name, index, Boolean.valueOf(oldValue),
449                                    Boolean.valueOf(newValue));
450      }
451    
452      /**
453     * Tell whether the specified property is being listened on or not. This     * Tell whether the specified property is being listened on or not. This
454     * will only return <code>true</code> if there are listeners on all     * will only return <code>true</code> if there are listeners on all
455     * properties or if there is a listener specifically on this property.     * properties or if there is a listener specifically on this property.

Legend:
Removed from v.1.8.2.3  
changed lines
  Added in v.1.8.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26