| 21 |
aurelien |
1 |
package org.tela_botanica.del.client.gestionhistorique;
|
|
|
2 |
|
| 347 |
aurelien |
3 |
import org.tela_botanica.del.client.services.rest.ImageServiceConcret;
|
| 392 |
aurelien |
4 |
import org.tela_botanica.del.client.services.rest.ObservationServiceConcret;
|
| 959 |
benjamin |
5 |
import org.tela_botanica.del.client.services.rest.ProtocoleServiceConcret;
|
| 73 |
benjamin |
6 |
import org.tela_botanica.del.client.vues.comparaisoneflore.ComparaisonEflorePresenteur;
|
| 285 |
benjamin |
7 |
import org.tela_botanica.del.client.vues.comparaisoneflore.ComparaisonEfloreVue;
|
| 54 |
aurelien |
8 |
import org.tela_botanica.del.client.vues.plateformedetermination.DeterminationPresenteur;
|
| 304 |
aurelien |
9 |
import org.tela_botanica.del.client.vues.plateformedetermination.DeterminationVue;
|
| 477 |
benjamin |
10 |
import org.tela_botanica.del.client.vues.rechercheimages.moteur.MoteurRechercheImagePresenteur;
|
|
|
11 |
import org.tela_botanica.del.client.vues.rechercheimages.moteur.MoteurRechercheImageVue;
|
|
|
12 |
import org.tela_botanica.del.client.vues.rechercheobservations.moteur.MoteurRechercheObservationsPresenteur;
|
|
|
13 |
import org.tela_botanica.del.client.vues.rechercheobservations.moteur.MoteurRechercheObservationsVue;
|
| 184 |
benjamin |
14 |
import org.tela_botanica.del.client.vues.vueinitiale.PresenteurInitial;
|
| 21 |
aurelien |
15 |
|
|
|
16 |
import com.google.gwt.event.logical.shared.ValueChangeEvent;
|
|
|
17 |
import com.google.gwt.event.logical.shared.ValueChangeHandler;
|
|
|
18 |
import com.google.gwt.user.client.ui.RootPanel;
|
|
|
19 |
|
|
|
20 |
/**
|
|
|
21 |
* @author Benjamin
|
| 25 |
gduche |
22 |
*
|
| 21 |
aurelien |
23 |
*/
|
| 25 |
gduche |
24 |
public class GestionnaireHistorique implements ValueChangeHandler<String> {
|
| 21 |
aurelien |
25 |
|
| 25 |
gduche |
26 |
/**
|
|
|
27 |
* Évènement lorsque l'historique change. L'action par défaut affiche la
|
|
|
28 |
* page d'accueil.
|
|
|
29 |
* */
|
|
|
30 |
public void onValueChange(ValueChangeEvent<String> event) {
|
| 21 |
aurelien |
31 |
|
| 315 |
gduche |
32 |
RootPanel.get("navigation").clear();
|
|
|
33 |
new PresenteurInitial().go(RootPanel.get("navigation"));
|
| 335 |
benjamin |
34 |
|
| 315 |
gduche |
35 |
if (event.getValue().equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
|
| 234 |
gduche |
36 |
RootPanel.get("contenu").clear();
|
| 959 |
benjamin |
37 |
new MoteurRechercheImagePresenteur(new MoteurRechercheImageVue(), new ProtocoleServiceConcret()).go(RootPanel.get("contenu"));
|
| 1035 |
benjamin |
38 |
} else if (event.getValue().contains(ConstantesNavigation.PAGE_VALIDATION)) {
|
| 234 |
gduche |
39 |
RootPanel.get("contenu").clear();
|
| 959 |
benjamin |
40 |
new DeterminationPresenteur(new DeterminationVue(), new ObservationServiceConcret(), new ProtocoleServiceConcret()).go(RootPanel.get("contenu"));
|
| 73 |
benjamin |
41 |
} else if (event.getValue().equals(ConstantesNavigation.PAGE_COMPARAISON_EFLORE)) {
|
| 234 |
gduche |
42 |
RootPanel.get("contenu").clear();
|
| 882 |
aurelien |
43 |
new ComparaisonEflorePresenteur(new ComparaisonEfloreVue(), new ImageServiceConcret()).go(RootPanel.get("contenu"));
|
| 179 |
benjamin |
44 |
} else if (event.getValue().equals(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS)) {
|
| 234 |
gduche |
45 |
RootPanel.get("contenu").clear();
|
| 477 |
benjamin |
46 |
MoteurRechercheObservationsPresenteur presenteur = new MoteurRechercheObservationsPresenteur(new ObservationServiceConcret(), new MoteurRechercheObservationsVue());
|
| 335 |
benjamin |
47 |
presenteur.go(RootPanel.get("contenu"));
|
| 25 |
gduche |
48 |
}
|
| 1035 |
benjamin |
49 |
else{
|
|
|
50 |
RootPanel.get("contenu").clear();
|
| 1091 |
gduche |
51 |
MoteurRechercheObservationsPresenteur presenteur = new MoteurRechercheObservationsPresenteur(new ObservationServiceConcret(), new MoteurRechercheObservationsVue());
|
|
|
52 |
presenteur.go(RootPanel.get("contenu"));
|
| 1035 |
benjamin |
53 |
}
|
| 25 |
gduche |
54 |
}
|
| 21 |
aurelien |
55 |
}
|