Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
261 aurelien 1
package org.tela_botanica.del.client.composants.formulaires;
2
 
3
import com.google.gwt.user.client.Timer;
4
import com.google.gwt.user.client.ui.LayoutPanel;
5
import com.google.gwt.user.client.ui.ListBox;
6
import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
7
import com.google.gwt.user.client.ui.SuggestBox;
8
import com.google.gwt.user.client.ui.SuggestOracle;
9
 
10
public class AutoCompletionComboBoxVue extends LayoutPanel {
11
 
12
	MultiWordSuggestOracle msu = new MultiWordSuggestOracle();
13
	SuggestBox suggestions = new SuggestBox(msu);
14
 
15
 
16
	public AutoCompletionComboBoxVue() {
17
		add(suggestions);
18
		setHeight("100%");
19
		setWidth("100%");
20
	}
21
 
22
	public SuggestBox getSuggestBox() {
23
		return suggestions;
24
	}
25
 
26
	public void remplirListe(String[] listePropositions) {
27
 
28
		msu.clear();
29
		for (int i = 0; i < listePropositions.length; i++) {
30
			msu.add(listePropositions[i]);
31
		}
32
	}
33
 
34
	public void afficherSuggestions(SuggestOracle.Request requeteOracle, SuggestOracle.Callback callBackOracle) {
35
		msu.requestSuggestions(requeteOracle, callBackOracle);
36
	}
37
}