Subversion Repositories eFlore/Archives.cel-v1

Rev

Rev 6 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 ddelon 1
package org.tela_botanica.client;
2
 
3
import java.util.Iterator;
4
import java.util.Vector;
5
 
25 ddelon 6
import com.google.gwt.user.client.ResponseTextHandler;
7
 
2 ddelon 8
public class AutoCompleteAsyncTextBoxListenerCollection extends Vector {
9
 
10
  private static final long serialVersionUID = -2767605614048989439L;
11
  /**
25 ddelon 12
   * Fires a Text enter event to all listeners.
2 ddelon 13
   *
14
   * @param sender the widget sending the event
15
   * @param text the text sent
16
   */
6 ddelon 17
  public void fireTextBoxEnter(SourcesAutoCompleteAsyncTextBoxEvents sender,  String text, String value) {
2 ddelon 18
    for (Iterator it = iterator(); it.hasNext();) {
19
      AutoCompleteAsyncTextBoxListener listener = (AutoCompleteAsyncTextBoxListener) it.next();
6 ddelon 20
      listener.onValidate(sender, text, value);
2 ddelon 21
    }
22
  }
25 ddelon 23
 
24
 
25
  /**
26
   * Fires a Text complete event to all listeners.
27
   *
28
   * @param sender the widget sending the event
29
   * @param text the text sent
30
   */
31
  public void fireTextBoxComplete(ResponseTextHandler sender,  String text, String value) {
32
    for (Iterator it = iterator(); it.hasNext();) {
33
      AutoCompleteAsyncTextBoxListener listener = (AutoCompleteAsyncTextBoxListener) it.next();
34
      listener.onComplete(sender, text, value);
35
    }
36
  }
37
 
2 ddelon 38
}