Subversion Repositories eFlore/Applications.del

Rev

Rev 386 | 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.Timer;
import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.user.client.ui.ListBox;
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);
                setHeight("100%");
                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);
        }
}