Package com.google.gwt.user.client.ui
Class DelegatingClickListenerCollection
java.lang.Object
java.util.AbstractCollection<ClickListener>
java.util.AbstractList<ClickListener>
java.util.ArrayList<ClickListener>
com.google.gwt.user.client.ui.ClickListenerCollection
com.google.gwt.user.client.ui.DelegatingClickListenerCollection
- All Implemented Interfaces:
ClickListener,Serializable,Cloneable,Iterable<ClickListener>,Collection<ClickListener>,EventListener,List<ClickListener>,RandomAccess,SequencedCollection<ClickListener>
@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 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);
}
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionDelegatingClickListenerCollection(Widget owner, SourcesClickEvents delegatedTo) Deprecated.Constructor forDelegatingClickListenerCollection. -
Method Summary
Methods inherited from class com.google.gwt.user.client.ui.ClickListenerCollection
fireClickMethods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
DelegatingClickListenerCollection
Deprecated.Constructor forDelegatingClickListenerCollection.- Parameters:
owner- owner of listenersdelegatedTo- source of events
-
-
Method Details
-
onClick
Deprecated.Description copied from interface:ClickListenerFired when the user clicks on a widget.- Specified by:
onClickin interfaceClickListener- Parameters:
sender- the widget sending the event.
-
Widget.delegateEvent(com.google.gwt.user.client.ui.Widget, com.google.gwt.event.shared.GwtEvent<?>)instead