public class

DelegatingClickListenerCollection

extends ClickListenerCollection
implements ClickListener
java.lang.Object
   ↳ java.util.AbstractCollection<E>
     ↳ java.util.AbstractList<E>
       ↳ java.util.ArrayList<E>
         ↳ com.google.gwt.user.client.ui.ClickListenerCollection
           ↳ com.google.gwt.user.client.ui.DelegatingClickListenerCollection

This class is deprecated.
Use delegateEvent(Widget, GwtEvent) instead

Class Overview

ClickListenerCollection 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 DelegatingClickListenerCollection, simply use the DelegatingClickListenerCollection instead of a ClickListenerCollection. For example, in SuggestBox, the following code is used to listen to click events on the SuggestBox's underlying widget.

  public void addClickListener(ClickListener listener) {
    if (clickListeners == null) {
      clickListeners = new DelegatingClickListenerCollection(this, box);
    }
    clickListeners.add(listener);
  }

Summary

[Expand]
Inherited Fields
From class java.util.AbstractList
Public Constructors
DelegatingClickListenerCollection(Widget owner, SourcesClickEvents delegatedTo)
Public Methods
void onClick(Widget sender)
Fired when the user clicks on a widget.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.ClickListenerCollection
From class java.util.ArrayList
From class java.util.AbstractList
From class java.util.AbstractCollection
From class java.lang.Object
From interface com.google.gwt.user.client.ui.ClickListener
From interface java.lang.Iterable
From interface java.util.Collection
From interface java.util.List

Public Constructors

public DelegatingClickListenerCollection (Widget owner, SourcesClickEvents delegatedTo)

Parameters
owner owner of listeners
delegatedTo source of events

Public Methods

public void onClick (Widget sender)

Fired when the user clicks on a widget.

Parameters
sender the widget sending the event.