com.maryanovsky.gwtutils.client
Class DelegatingReadyListenerCollection

java.lang.Object
  extended by com.maryanovsky.gwtutils.client.DelegatingReadyListenerCollection
All Implemented Interfaces:
ReadyListener, EventListener

public class DelegatingReadyListenerCollection
extends Object
implements ReadyListener

A ready listener, which simply reports what it sees to a list of other ready listener.

Author:
Maryanovsky Alexander

Constructor Summary
DelegatingReadyListenerCollection()
          Creates a new DelegatingReadyListenerCollection.
DelegatingReadyListenerCollection(ReadyListener readyListener)
          Creates a new DelegatingReadyListenerCollection with the specified ready listener as the first of many to report to.
 
Method Summary
 void add(ReadyListener readyListener)
          Adds the specified ready listener to get notified when one of the sources we are registered with changes its ready state.
 void becameReady(Object source)
          Notifies our ready listeners of the change.
 void becameUnready(Object source)
          Notifies our ready listeners of the change.
 void remove(ReadyListener readyListener)
          Removes the specified ready listener from getting notified when one of the sources with are registered with changes its ready state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingReadyListenerCollection

public DelegatingReadyListenerCollection()
Creates a new DelegatingReadyListenerCollection.


DelegatingReadyListenerCollection

public DelegatingReadyListenerCollection(ReadyListener readyListener)
Creates a new DelegatingReadyListenerCollection with the specified ready listener as the first of many to report to. This constructor is useful if you just have one listener to delegate to.

Method Detail

add

public void add(ReadyListener readyListener)
Adds the specified ready listener to get notified when one of the sources we are registered with changes its ready state.


remove

public void remove(ReadyListener readyListener)
Removes the specified ready listener from getting notified when one of the sources with are registered with changes its ready state.


becameReady

public void becameReady(Object source)
Notifies our ready listeners of the change.

Specified by:
becameReady in interface ReadyListener

becameUnready

public void becameUnready(Object source)
Notifies our ready listeners of the change.

Specified by:
becameUnready in interface ReadyListener