Rev 386 | Rev 450 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package org.tela_botanica.del.client.composants.formulaires;
import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.user.client.ui.SuggestOracle;
public class AutoCompletionComboBoxVue extends LayoutPanel {
MultiWordSuggestOracle msu = new MultiWordSuggestOracle();
SuggestBox suggestions = new SuggestBox(msu);
public AutoCompletionComboBoxVue() {
add(suggestions);
//TODO: voir avec greg si la taille doit être définie ici
setHeight("25px");
setWidth("100%");
}
public SuggestBox getSuggestBox() {
return suggestions;
}
public void remplirListe(String[] listePropositions) {
msu.clear();
for (int i = 0; i < listePropositions.length; i++) {
msu.add(listePropositions[i]);
}
}
public void afficherSuggestions(SuggestOracle.Request requeteOracle, SuggestOracle.Callback callBackOracle) {
msu.requestSuggestions(requeteOracle, callBackOracle);
}
public void nettoyer() {
suggestions.setText("");
}
public void setValeur(String taxon) {
suggestions.setText(taxon);
}
}