Subversion Repositories eFlore/Applications.del

Rev

Rev 1194 | Rev 1206 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1194 Rev 1196
Line 7... Line 7...
7
import org.tela_botanica.del.client.services.rest.ObservationServiceConcret;
7
import org.tela_botanica.del.client.services.rest.ObservationServiceConcret;
8
import org.tela_botanica.del.client.services.rest.ProtocoleServiceConcret;
8
import org.tela_botanica.del.client.services.rest.ProtocoleServiceConcret;
9
import org.tela_botanica.del.client.services.rest.UtilisateurServiceConcret;
9
import org.tela_botanica.del.client.services.rest.UtilisateurServiceConcret;
10
import org.tela_botanica.del.client.vues.comparaisoneflore.ComparaisonEflorePresenteur;
10
import org.tela_botanica.del.client.vues.comparaisoneflore.ComparaisonEflorePresenteur;
11
import org.tela_botanica.del.client.vues.comparaisoneflore.ComparaisonEfloreVue;
11
import org.tela_botanica.del.client.vues.comparaisoneflore.ComparaisonEfloreVue;
-
 
12
import org.tela_botanica.del.client.vues.identiplante.moteur.MoteurIdentiplantePresenteur;
-
 
13
import org.tela_botanica.del.client.vues.identiplante.moteur.MoteurIdentiplanteVue;
12
import org.tela_botanica.del.client.vues.plateformedetermination.DeterminationPresenteur;
14
import org.tela_botanica.del.client.vues.identiplante.plateformedetermination.IdentiplanteDeterminationPresenteur;
13
import org.tela_botanica.del.client.vues.plateformedetermination.DeterminationVue;
15
import org.tela_botanica.del.client.vues.identiplante.plateformedetermination.IdentiplanteDeterminationVue;
14
import org.tela_botanica.del.client.vues.rechercheimages.moteur.MoteurRechercheImagePresenteur;
16
import org.tela_botanica.del.client.vues.pictoflora.moteur.MoteurPictofloraPresenteur;
15
import org.tela_botanica.del.client.vues.rechercheimages.moteur.MoteurRechercheImageVue;
17
import org.tela_botanica.del.client.vues.pictoflora.moteur.MoteurPictofloraVue;
16
import org.tela_botanica.del.client.vues.rechercheobservations.moteur.MoteurRechercheObservationsPresenteur;
18
import org.tela_botanica.del.client.vues.pictoflora.plateformedetermination.PictofloraDeterminationPresenteur;
17
import org.tela_botanica.del.client.vues.rechercheobservations.moteur.MoteurRechercheObservationsVue;
19
import org.tela_botanica.del.client.vues.pictoflora.plateformedetermination.PictofloraDeterminationVue;
Line 18... Line 20...
18
 
20
 
19
import com.google.gwt.core.shared.GWT;
21
import com.google.gwt.core.shared.GWT;
20
import com.google.gwt.event.logical.shared.ValueChangeEvent;
22
import com.google.gwt.event.logical.shared.ValueChangeEvent;
21
import com.google.gwt.event.logical.shared.ValueChangeHandler;
23
import com.google.gwt.event.logical.shared.ValueChangeHandler;
Line 34... Line 36...
34
	 * Évènement lorsque l'historique change. L'action par défaut affiche la
36
	 * Évènement lorsque l'historique change. L'action par défaut affiche la
35
	 * page d'accueil.
37
	 * page d'accueil.
36
	 * */
38
	 * */
37
	public void onValueChange(ValueChangeEvent<String> event) {
39
	public void onValueChange(ValueChangeEvent<String> event) {
Line -... Line 40...
-
 
40
 
38
 
41
		
39
		//1. définition des variables 
42
		//1. définition des variables
40
		String eventValue = event.getValue();
43
		String eventValue = event.getValue();
41
		Panel contenu = RootPanel.get("contenu");
44
		Panel contenu = RootPanel.get("contenu");
42
		Panel zoneIdentification = RootPanel.get("zoneIdentification");
45
		Panel zoneIdentification = RootPanel.get("zoneIdentification");
Line 65... Line 68...
65
				afficherTitrePictoFlora(titre);
68
				afficherTitrePictoFlora(titre);
66
			} else {
69
			} else {
67
				afficherTitreIdp(titre);
70
				afficherTitreIdp(titre);
68
			}
71
			}
69
		}
72
		}
70
		
-
 
71
		//Actions en fonction de la valeur de l'évènement
73
		//Actions en fonction de la valeur de l'évènement
72
		if (eventValue.equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
74
		if (eventValue.equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
73
			cache.setHome(ConstantesNavigation.PAGE_RECHERCHE_IMAGES);
75
			cache.setHome(ConstantesNavigation.PAGE_RECHERCHE_IMAGES);
74
			lancerMoteurRechercheImages(contenu);
76
			lancerMoteurRechercheImages(contenu);
75
		} else if (eventValue.contains(ConstantesNavigation.PAGE_VALIDATION)) {
77
		} else if (eventValue.startsWith(ConstantesNavigation.PAGE_VALIDATION)) {
-
 
78
			afficherTitreIdp(titre);
-
 
79
			IdentiplanteDeterminationPresenteur presenteur = new IdentiplanteDeterminationPresenteur(new IdentiplanteDeterminationVue(), new ObservationServiceConcret());
-
 
80
			presenteur.go(contenu);
-
 
81
		} else if (eventValue.startsWith(ConstantesNavigation.PAGE_VALIDATION_PICTOFLORA)) {
-
 
82
			afficherTitrePictoFlora(titre);
76
			DeterminationPresenteur presenteur = new DeterminationPresenteur(new DeterminationVue(), new ObservationServiceConcret(), new ProtocoleServiceConcret());
83
			PictofloraDeterminationPresenteur presenteur = new PictofloraDeterminationPresenteur(new PictofloraDeterminationVue(), new ObservationServiceConcret(), new ProtocoleServiceConcret());
77
			presenteur.go(contenu);
84
			presenteur.go(contenu);
78
		} else if (eventValue.equals(ConstantesNavigation.PAGE_COMPARAISON_EFLORE)) {
85
		} else if (eventValue.equals(ConstantesNavigation.PAGE_COMPARAISON_EFLORE)) {
79
			ComparaisonEflorePresenteur presenteur = new ComparaisonEflorePresenteur(new ComparaisonEfloreVue(), new ImageServiceConcret());
86
			ComparaisonEflorePresenteur presenteur = new ComparaisonEflorePresenteur(new ComparaisonEfloreVue(), new ImageServiceConcret());
80
			presenteur.go(contenu);
87
			presenteur.go(contenu);
81
		} else if (eventValue.equals(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS)) {
88
		} else if (eventValue.equals(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS)) {
Line 116... Line 123...
116
	/**
123
	/**
117
	 * Générer la page de recherche observation et l'afficher dans panneau
124
	 * Générer la page de recherche observation et l'afficher dans panneau
118
	 * @param Panel panneau le panneau pour afficher le résultat
125
	 * @param Panel panneau le panneau pour afficher le résultat
119
	 * */
126
	 * */
120
	public void lancerMoteurRechercheObservation(Panel panneau) {
127
	public void lancerMoteurRechercheObservation(Panel panneau) {
121
		MoteurRechercheObservationsPresenteur presenteur = new MoteurRechercheObservationsPresenteur(new ObservationServiceConcret(), new MoteurRechercheObservationsVue());
128
		MoteurIdentiplantePresenteur presenteur = new MoteurIdentiplantePresenteur(new ObservationServiceConcret(), new MoteurIdentiplanteVue());
122
		presenteur.go(panneau);
129
		presenteur.go(panneau);
123
	}
130
	}
Line 124... Line 131...
124
	
131
	
125
	/**
132
	/**
126
	 * Générer la page de recherche images et l'afficher dans panneau
133
	 * Générer la page de recherche images et l'afficher dans panneau
127
	 * @param Panel panneau le panneau pour afficher le résultat
134
	 * @param Panel panneau le panneau pour afficher le résultat
128
	 * */
135
	 * */
129
	public void lancerMoteurRechercheImages(Panel panneau) {
136
	public void lancerMoteurRechercheImages(Panel panneau) {
130
		MoteurRechercheImagePresenteur presenteur = new MoteurRechercheImagePresenteur(new MoteurRechercheImageVue(), new ProtocoleServiceConcret());
137
		MoteurPictofloraPresenteur presenteur = new MoteurPictofloraPresenteur(new MoteurPictofloraVue(), new ProtocoleServiceConcret());
131
		presenteur.go(panneau);
138
		presenteur.go(panneau);
132
	}
139
	}
133
}
140
}