Subversion Repositories eFlore/Applications.del

Rev

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

Rev 52 Rev 86
Line 1... Line 1...
1
package org.tela_botanica.del.client.vues.rechercheobservations;
1
package org.tela_botanica.del.client.vues.rechercheobservations;
Line -... Line 2...
-
 
2
 
-
 
3
import java.util.ArrayList;
2
 
4
import java.util.Iterator;
Line 3... Line 5...
3
import java.util.List;
5
import java.util.List;
4
 
6
 
5
import org.tela_botanica.del.client.modeles.Observation;
7
import org.tela_botanica.del.client.modeles.Observation;
6
import org.tela_botanica.del.client.utils.KeyboardKeyListener;
8
import org.tela_botanica.del.client.utils.KeyboardKeyListener;
Line 7... Line 9...
7
import org.tela_botanica.del.client.utils.MockDatasource;
9
import org.tela_botanica.del.client.utils.MockDatasource;
8
import org.tela_botanica.del.client.vues.rechercheobservations.pagination.NumeroPagePresenteur;
10
import org.tela_botanica.del.client.vues.rechercheobservations.pagination.NumeroPagePresenteur;
9
 
11
 
-
 
12
import com.google.gwt.event.dom.client.ClickEvent;
Line 10... Line 13...
10
import com.google.gwt.event.dom.client.ClickEvent;
13
import com.google.gwt.event.dom.client.ClickHandler;
Line 11... Line 14...
11
import com.google.gwt.event.dom.client.ClickHandler;
14
import com.google.gwt.user.client.ui.HasWidgets;
12
import com.google.gwt.user.client.ui.HasWidgets;
15
import com.google.gwt.user.client.ui.Panel;
13
 
16
 
-
 
17
public class ObservationRecherchePresenteur {
14
public class ObservationRecherchePresenteur {
18
 
Line 15... Line 19...
15
 
19
	private final MockDatasource observationService = MockDatasource.getInstance();
16
	private final MockDatasource observationService = MockDatasource.getInstance();
20
	private final ObservationRechercheVue vue = new ObservationRechercheVue();
17
	private final ObservationRechercheVue vue = new ObservationRechercheVue();
21
	private static ObservationRecherchePresenteur instance;
Line 61... Line 65...
61
 
65
 
62
		// TODO : créer une méthode globale pour l'application ? voir
66
		// TODO : créer une méthode globale pour l'application ? voir
63
		// superclasse présenteur ?
67
		// superclasse présenteur ?
64
		// FIXME : ne s'affiche pas
68
		// FIXME : ne s'affiche pas
65
		vue.startChargement();
69
		vue.startChargement();
-
 
70
		vue.creerPanneauxObservation(observations);
-
 
71
 
-
 
72
		Iterator<Panel> panelIterator = vue.getPanneauxImages().iterator();
-
 
73
		for (Observation observation : observations) {
-
 
74
			Panel imagePanel = panelIterator.next();
-
 
75
			ObservationPresenteur observationPresenteur = new ObservationPresenteur(observation);
-
 
76
			observationPresenteur.go(imagePanel);
-
 
77
			observationPresenteurs.add(observationPresenteur);
Line 66... Line 78...
66
		vue.chargerPanneauxObservation(observations);
78
		}
67
 
79
 
Line 68... Line 80...
68
		vue.afficherPanneauxImage(0, vue.getNbImagesPerPage());
80
		vue.afficherPanneauxImage(0, vue.getNbImagesPerPage());
Line 69... Line 81...
69
		createPaginationWidget(observations.size());
81
		createPaginationWidget(observations.size());
-
 
82
 
-
 
83
		vue.stopChargement();
-
 
84
 
-
 
85
	}
-
 
86
	
-
 
87
	public void fermerTousPanneauxDetailsObservations(){
-
 
88
		for(ObservationPresenteur observationPresenteur: observationPresenteurs){
-
 
89
			if(observationPresenteur.isDetailsOpen()){
Line 70... Line 90...
70
 
90
				observationPresenteur.cacherDetails();
Line 71... Line 91...
71
		vue.stopChargement();
91
			}
72
 
92
		}