|
GWT 2.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.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
Widget.delegateEvent(com.google.gwt.user.client.ui.Widget, com.google.gwt.event.shared.GwtEvent>)
instead
@Deprecated public class DelegatingFocusListenerCollection
FocusListenerCollection
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 DelegatingFocusListenerCollection
,
simply use the DelegatingFocusListenerCollection
instead of a
FocusListenerCollection
. For example, in SuggestBox
, the
following code is used to listen to focus events on the SuggestBox
's
underlying widget.
public void addFocusListener(FocusListener listener) { if (focusListeners == null) { focusListeners = new DelegatingFocusListenerCollection(this, box); } focusListeners.add(listener); }
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
DelegatingFocusListenerCollection(Widget owner,
SourcesFocusEvents delegatedTo)
Deprecated. Constructor for DelegatingFocusListenerCollection . |
Method Summary | |
---|---|
void |
onFocus(Widget sender)
Deprecated. Fired when a widget receives keyboard focus. |
void |
onLostFocus(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, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, 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 |
Constructor Detail |
---|
public DelegatingFocusListenerCollection(Widget owner, SourcesFocusEvents delegatedTo)
DelegatingFocusListenerCollection
. *
owner
- owner of listenersdelegatedTo
- source of eventsMethod Detail |
---|
public void onFocus(Widget sender)
FocusListener
onFocus
in interface FocusListener
sender
- the widget receiving focus.public void onLostFocus(Widget sender)
FocusListener
onLostFocus
in interface FocusListener
sender
- the widget losing focus.
|
GWT 2.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |