Package com.google.gwt.user.client.ui
Class DelegatingFocusListenerCollection
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<FocusListener>
-
- com.google.gwt.user.client.ui.FocusListenerCollection
-
- com.google.gwt.user.client.ui.DelegatingFocusListenerCollection
-
- All Implemented Interfaces:
FocusListener,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<FocusListener>,java.util.Collection<FocusListener>,java.util.EventListener,java.util.List<FocusListener>,java.util.RandomAccess
@Deprecated public class DelegatingFocusListenerCollection extends FocusListenerCollection implements FocusListener
Deprecated.FocusListenerCollectionused to correctly hook up listeners which need to listen to events from another source.For example,
Compositewidgets 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 aDelegatingFocusListenerCollection, simply use theDelegatingFocusListenerCollectioninstead of aFocusListenerCollection. For example, inSuggestBox, the following code is used to listen to focus events on theSuggestBox's underlying widget.public void addFocusListener(FocusListener listener) { if (focusListeners == null) { focusListeners = new DelegatingFocusListenerCollection(this, box); } focusListeners.add(listener); }- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DelegatingFocusListenerCollection(Widget owner, SourcesFocusEvents delegatedTo)Deprecated.Constructor forDelegatingFocusListenerCollection.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidonFocus(Widget sender)Deprecated.Fired when a widget receives keyboard focus.voidonLostFocus(Widget sender)Deprecated.Fired when a widget loses keyboard focus.-
Methods inherited from class com.google.gwt.user.client.ui.FocusListenerCollection
fireFocus, fireFocusEvent, fireLostFocus
-
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
-
DelegatingFocusListenerCollection
public DelegatingFocusListenerCollection(Widget owner, SourcesFocusEvents delegatedTo)
Deprecated.Constructor forDelegatingFocusListenerCollection. *- Parameters:
owner- owner of listenersdelegatedTo- source of events
-
-
Method Detail
-
onFocus
public void onFocus(Widget sender)
Deprecated.Description copied from interface:FocusListenerFired when a widget receives keyboard focus.- Specified by:
onFocusin interfaceFocusListener- Parameters:
sender- the widget receiving focus.
-
onLostFocus
public void onLostFocus(Widget sender)
Deprecated.Description copied from interface:FocusListenerFired when a widget loses keyboard focus.- Specified by:
onLostFocusin interfaceFocusListener- Parameters:
sender- the widget losing focus.
-
-