New file |
0,0 → 1,58 |
package org.tela_botanica.del.client.vues.rechercheobservations.moteur; |
|
import org.tela_botanica.del.client.composants.moteurrecherche.MoteurRecherchePresenteur; |
import org.tela_botanica.del.client.composants.moteurrecherche.MoteurRechercheVue; |
import org.tela_botanica.del.client.composants.presenteur.Presenteur; |
import org.tela_botanica.del.client.modeles.ModeRecherche; |
import org.tela_botanica.del.client.services.rest.ObservationService; |
import org.tela_botanica.del.client.services.rest.ObservationServiceConcret; |
import org.tela_botanica.del.client.vues.rechercheobservations.resultats.ResultatsRechercheObservationsPresenteur; |
import org.tela_botanica.del.client.vues.rechercheobservations.resultats.ResultatsRechercheObservationsVue; |
|
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
|
public class MoteurRechercheObservationsPresenteur extends Presenteur { |
|
public interface Vue extends IsWidget { |
public HasWidgets getZoneRecherche(); |
|
public HasWidgets getZoneResultats(); |
|
} |
|
private Vue vue; |
|
public MoteurRechercheObservationsPresenteur(ObservationService serviceObs, Vue vue) { |
this.vue = vue; |
} |
|
public void go(HasWidgets composite) { |
|
composite.add(vue.asWidget()); |
ajouterMoteurRechercheAvancee(); |
gererEvenements(); |
} |
|
protected void ajouterMoteurRechercheAvancee() { |
MoteurRecherchePresenteur presenteur = new MoteurRecherchePresenteur(new MoteurRechercheVue("") { |
}, ModeRecherche.MODE_OBSERVATION) { |
|
@Override |
public void lancerRecherche() { |
chercherObservations(); |
} |
}; |
presenteur.go(vue.getZoneRecherche()); |
} |
|
public void chercherObservations() { |
vue.getZoneResultats().clear(); |
new ResultatsRechercheObservationsPresenteur(new ObservationServiceConcret(), new ResultatsRechercheObservationsVue()).go(vue.getZoneResultats()); |
} |
|
protected void gererEvenements() { |
|
} |
|
} |