Package com.google.gwt.user.client.ui
Class DelegatingClickListenerCollection
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<ClickListener>
-
- com.google.gwt.user.client.ui.ClickListenerCollection
-
- com.google.gwt.user.client.ui.DelegatingClickListenerCollection
-
- All Implemented Interfaces:
ClickListener
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<ClickListener>
,java.util.Collection<ClickListener>
,java.util.EventListener
,java.util.List<ClickListener>
,java.util.RandomAccess
@Deprecated public class DelegatingClickListenerCollection extends ClickListenerCollection implements ClickListener
Deprecated.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 aDelegatingClickListenerCollection
, simply use theDelegatingClickListenerCollection
instead of aClickListenerCollection
. For example, inSuggestBox
, the following code is used to listen to click events on theSuggestBox
's underlying widget.public void addClickListener(ClickListener listener) { if (clickListeners == null) { clickListeners = new DelegatingClickListenerCollection(this, box); } clickListeners.add(listener); }
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DelegatingClickListenerCollection(Widget owner, SourcesClickEvents delegatedTo)
Deprecated.Constructor forDelegatingClickListenerCollection
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
onClick(Widget sender)
Deprecated.Fired when the user clicks on a widget.-
Methods inherited from class com.google.gwt.user.client.ui.ClickListenerCollection
fireClick
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Constructor Detail
-
DelegatingClickListenerCollection
public DelegatingClickListenerCollection(Widget owner, SourcesClickEvents delegatedTo)
Deprecated.Constructor forDelegatingClickListenerCollection
.- Parameters:
owner
- owner of listenersdelegatedTo
- source of events
-
-
Method Detail
-
onClick
public void onClick(Widget sender)
Deprecated.Description copied from interface:ClickListener
Fired when the user clicks on a widget.- Specified by:
onClick
in interfaceClickListener
- Parameters:
sender
- the widget sending the event.
-
-