GWT 2.7.0

## com.google.gwt.user.client.ui
Class DelegatingChangeListenerCollection

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              java.util.ArrayList<ChangeListener>
                  com.google.gwt.user.client.ui.ChangeListenerCollection
                      com.google.gwt.user.client.ui.DelegatingChangeListenerCollection

All Implemented Interfaces:
  ChangeListener, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<ChangeListener>, java.util.Collection<ChangeListener>, java.util.EventListener, java.util.List<ChangeListener>, java.util.RandomAccess

Deprecated. Use `Widget.delegateEvent` instead

    @Deprecated
    public class DelegatingChangeListenerCollection

extends ChangeListenerCollection
implements ChangeListener

`ChangeListenerCollection` used to correctly hook up listeners which need to listen to events from another source.

For example, `Composite` widgets often need to listen to events generated on their wrapped widget. Upon the firing of a wrapped widget's event, the composite widget must fire its own listeners with itself as the source of the event. To use a `DelegatingChangeListenerCollection`, simply use the `DelegatingChangeListenerCollection` instead of a `ChangeListenerCollection`. For example, in `SuggestBox`, the following code is used to listen to change events on the `SuggestBox`'s underlying widget.

      public void addChangeListener(ChangeListener listener) {
        if (changeListeners == null) {
          changeListeners = new DelegatingChangeListenerCollection(this, box);
        }
        changeListeners.add(listener);
      }

See Also:
  Serialized Form

Field Summary

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`DelegatingChangeListenerCollection(Widget owner, SourcesChangeEvents delegatedTo)` Deprecated. Constructor for `DelegatingChangeListenerCollection`.

Method Summary
`void` | `onChange(Widget sender)` Deprecated. Fired when a widget changes, where 'change' is defined by the widget sending the event.

Methods inherited from class com.google.gwt.user.client.ui.ChangeListenerCollection
`fireChange`

Methods inherited from class java.util.ArrayList
`add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize`

Methods inherited from class java.util.AbstractList
`equals, hashCode, iterator, listIterator, listIterator, subList`

Methods inherited from class java.util.AbstractCollection
`containsAll, removeAll, retainAll, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList`

Constructor Detail

### DelegatingChangeListenerCollection

    public DelegatingChangeListenerCollection(Widget owner,
                                              SourcesChangeEvents delegatedTo)

  Deprecated.
  Constructor for `DelegatingChangeListenerCollection`.

  Parameters:
    `owner` - owner of listeners
    `delegatedTo` - source of events

Method Detail

### onChange

    public void onChange(Widget sender)

  Deprecated.
  Description copied from interface: `ChangeListener`
  Fired when a widget changes, where 'change' is defined by the widget sending the event.

  Specified by:
    `onChange` in interface `ChangeListener`
  Parameters:
    `sender` - the widget that has changed

GWT 2.7.0