Subversion Repositories eFlore/Applications.del

Rev

Rev 1035 | Rev 1092 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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