Class DelegatingKeyboardListenerCollection

All Implemented Interfaces:
KeyboardListener, Serializable, Cloneable, Iterable<KeyboardListener>, Collection<KeyboardListener>, EventListener, List<KeyboardListener>, RandomAccess

@Deprecated public class DelegatingKeyboardListenerCollection extends KeyboardListenerCollection implements KeyboardListener
KeyboardListenerCollection used to correctly hook up event listeners to the composite's wrapped widget.

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 DelegatingKeyboardListenerCollection, simply use the DelegatingKeyboardListenerCollection instead of a KeyboardListenerCollection. For example, in SuggestBox, the following code is used to listen to keyboard events on the SuggestBox underlying widget.

  public void addKeyboardListener(KeyboardListener listener) {
    if (keyboardListeners == null) {
      keyboardListeners = new DelegatingKeyboardListenerCollection(this, box);
See Also: