Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 416 → Rev 450

/trunk/src/org/tela_botanica/del/client/composants/formulaires/AutoCompletionComboBoxVue.java
1,16 → 1,17
package org.tela_botanica.del.client.composants.formulaires;
 
import com.google.gwt.event.dom.client.HasKeyPressHandlers;
import com.google.gwt.user.client.ui.HasWidgets;
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 {
public class AutoCompletionComboBoxVue extends LayoutPanel implements AutoCompletionComboBoxPresenteur.Vue {
 
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
30,10 → 31,16
}
}
@Override
public void afficherSuggestions(SuggestOracle.Request requeteOracle, SuggestOracle.Callback callBackOracle) {
msu.requestSuggestions(requeteOracle, callBackOracle);
}
@Override
public void afficherListeDeroulante() {
suggestions.showSuggestionList();
}
public void nettoyer() {
suggestions.setText("");
}
41,4 → 48,19
public void setValeur(String taxon) {
suggestions.setText(taxon);
}
 
@Override
public HasKeyPressHandlers getSuggestBoxHasKeyPressHandlers() {
return suggestions;
}
 
@Override
public String getValeur() {
return suggestions.getText();
}
 
@Override
public void ajouterVue(HasWidgets composite) {
composite.add(this.asWidget());
}
}