This class is deprecated.
Use delegateEvent(Widget, GwtEvent>)
instead
Class Overview
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);
}
Summary
[Expand]
Inherited Fields |
From class
java.util.AbstractList
|
Public Methods |
void
|
onFocus(Widget sender)
Fired when a widget receives keyboard focus.
|
void
|
onLostFocus(Widget sender)
Fired when a widget loses keyboard focus.
|
[Expand]
Inherited Methods |
From class
com.google.gwt.user.client.ui.FocusListenerCollection
|
From class
java.util.ArrayList
boolean
|
add(E arg0)
|
void
|
add(int arg0, E arg1)
|
boolean
|
addAll(Collection<? extends E> arg0)
|
boolean
|
addAll(int arg0, Collection<? extends E> arg1)
|
void
|
clear()
|
Object
|
clone()
|
boolean
|
contains(Object arg0)
|
void
|
ensureCapacity(int arg0)
|
E
|
get(int arg0)
|
int
|
indexOf(Object arg0)
|
boolean
|
isEmpty()
|
int
|
lastIndexOf(Object arg0)
|
E
|
remove(int arg0)
|
boolean
|
remove(Object arg0)
|
void
|
removeRange(int arg0, int arg1)
|
E
|
set(int arg0, E arg1)
|
int
|
size()
|
<T>
T[]
|
toArray(T[] arg0)
|
Object[]
|
toArray()
|
void
|
trimToSize()
|
|
From class
java.util.AbstractList
boolean
|
add(E arg0)
|
void
|
add(int arg0, E arg1)
|
boolean
|
addAll(int arg0, Collection<? extends E> arg1)
|
void
|
clear()
|
boolean
|
equals(Object arg0)
|
abstract
E
|
get(int arg0)
|
int
|
hashCode()
|
int
|
indexOf(Object arg0)
|
Iterator<E>
|
iterator()
|
int
|
lastIndexOf(Object arg0)
|
ListIterator<E>
|
listIterator(int arg0)
|
ListIterator<E>
|
listIterator()
|
E
|
remove(int arg0)
|
void
|
removeRange(int arg0, int arg1)
|
E
|
set(int arg0, E arg1)
|
List<E>
|
subList(int arg0, int arg1)
|
|
From class
java.util.AbstractCollection
boolean
|
add(E arg0)
|
boolean
|
addAll(Collection<? extends E> arg0)
|
void
|
clear()
|
boolean
|
contains(Object arg0)
|
boolean
|
containsAll(Collection<?> arg0)
|
boolean
|
isEmpty()
|
abstract
Iterator<E>
|
iterator()
|
boolean
|
remove(Object arg0)
|
boolean
|
removeAll(Collection<?> arg0)
|
boolean
|
retainAll(Collection<?> arg0)
|
abstract
int
|
size()
|
<T>
T[]
|
toArray(T[] arg0)
|
Object[]
|
toArray()
|
String
|
toString()
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
com.google.gwt.user.client.ui.FocusListener
|
From interface
java.lang.Iterable
|
From interface
java.util.Collection
abstract
boolean
|
add(E arg0)
|
abstract
boolean
|
addAll(Collection<? extends E> arg0)
|
abstract
void
|
clear()
|
abstract
boolean
|
contains(Object arg0)
|
abstract
boolean
|
containsAll(Collection<?> arg0)
|
abstract
boolean
|
equals(Object arg0)
|
abstract
int
|
hashCode()
|
abstract
boolean
|
isEmpty()
|
abstract
Iterator<E>
|
iterator()
|
abstract
boolean
|
remove(Object arg0)
|
abstract
boolean
|
removeAll(Collection<?> arg0)
|
abstract
boolean
|
retainAll(Collection<?> arg0)
|
abstract
int
|
size()
|
abstract
<T>
T[]
|
toArray(T[] arg0)
|
abstract
Object[]
|
toArray()
|
|
From interface
java.util.List
abstract
boolean
|
add(E arg0)
|
abstract
void
|
add(int arg0, E arg1)
|
abstract
boolean
|
addAll(Collection<? extends E> arg0)
|
abstract
boolean
|
addAll(int arg0, Collection<? extends E> arg1)
|
abstract
void
|
clear()
|
abstract
boolean
|
contains(Object arg0)
|
abstract
boolean
|
containsAll(Collection<?> arg0)
|
abstract
boolean
|
equals(Object arg0)
|
abstract
E
|
get(int arg0)
|
abstract
int
|
hashCode()
|
abstract
int
|
indexOf(Object arg0)
|
abstract
boolean
|
isEmpty()
|
abstract
Iterator<E>
|
iterator()
|
abstract
int
|
lastIndexOf(Object arg0)
|
abstract
ListIterator<E>
|
listIterator(int arg0)
|
abstract
ListIterator<E>
|
listIterator()
|
abstract
E
|
remove(int arg0)
|
abstract
boolean
|
remove(Object arg0)
|
abstract
boolean
|
removeAll(Collection<?> arg0)
|
abstract
boolean
|
retainAll(Collection<?> arg0)
|
abstract
E
|
set(int arg0, E arg1)
|
abstract
int
|
size()
|
abstract
List<E>
|
subList(int arg0, int arg1)
|
abstract
<T>
T[]
|
toArray(T[] arg0)
|
abstract
Object[]
|
toArray()
|
|
Public Constructors
public
DelegatingFocusListenerCollection
(Widget owner, SourcesFocusEvents delegatedTo)
Parameters
owner
| owner of listeners |
delegatedTo
| source of events
|
Public Methods
public
void
onFocus
(Widget sender)
Fired when a widget receives keyboard focus.
Parameters
sender
| the widget receiving focus. |
public
void
onLostFocus
(Widget sender)
Fired when a widget loses keyboard focus.
Parameters
sender
| the widget losing focus. |