Subversion Repositories eFlore/Applications.del

Rev

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

Rev 27 Rev 32
Line 1... Line 1...
1
package org.tela_botanica.del.client.vues.rechercheobservations;
1
package org.tela_botanica.del.client.vues.rechercheobservations;
Line 2... Line -...
2
 
-
 
3
import java.util.ArrayList;
-
 
4
import java.util.Iterator;
2
 
Line 5... Line 3...
5
import java.util.List;
3
import java.util.List;
6
 
4
 
7
import org.tela_botanica.del.client.modeles.Observation;
5
import org.tela_botanica.del.client.modeles.Observation;
8
import org.tela_botanica.del.client.utils.KeyboardKeyListener;
6
import org.tela_botanica.del.client.utils.KeyboardKeyListener;
Line 9... Line 7...
9
import org.tela_botanica.del.client.utils.MockDatasource;
7
import org.tela_botanica.del.client.utils.MockDatasource;
10
import org.tela_botanica.del.client.vues.rechercheobservations.pagination.NumeroPagePresenteur;
8
import org.tela_botanica.del.client.vues.rechercheobservations.pagination.NumeroPagePresenteur;
11
 
9
 
12
import com.google.gwt.event.dom.client.ClickEvent;
-
 
13
import com.google.gwt.event.dom.client.ClickHandler;
-
 
Line 14... Line 10...
14
import com.google.gwt.user.client.ui.HasWidgets;
10
import com.google.gwt.event.dom.client.ClickEvent;
Line 15... Line 11...
15
import com.google.gwt.user.client.ui.Panel;
11
import com.google.gwt.event.dom.client.ClickHandler;
16
import com.google.gwt.user.client.ui.VerticalPanel;
12
import com.google.gwt.user.client.ui.HasWidgets;
Line 31... Line 27...
31
		gererEvenements();
27
		gererEvenements();
32
	}
28
	}
Line 33... Line 29...
33
 
29
 
34
	@SuppressWarnings("deprecation")
30
	@SuppressWarnings("deprecation")
-
 
31
	public void gererEvenements() {
-
 
32
		// FIXME : temporaire, juste pour débug
Line 35... Line 33...
35
	public void gererEvenements() {
33
		chargerObservations();
Line 36... Line 34...
36
 
34
 
37
		vue.getLabelChercher().addClickHandler(new ClickHandler() {
35
		vue.getLabelChercher().addClickHandler(new ClickHandler() {
Line 61... Line 59...
61
		// Remise à zéro du panneau d'affichage et des composants
59
		// Remise à zéro du panneau d'affichage et des composants
62
		vue.nettoyer();
60
		vue.nettoyer();
Line 63... Line 61...
63
 
61
 
64
		// TODO : créer une méthode globale pour l'application ? voir
62
		// TODO : créer une méthode globale pour l'application ? voir
-
 
63
		// superclasse présenteur ?
65
		// superclasse présenteur ?
64
		// FIXME : ne s'affiche pas
66
		vue.startChargement();
-
 
67
 
-
 
68
		// TODO : déplacer dans la vue
-
 
69
		List<Panel> imagePanels = new ArrayList<Panel>();
65
		vue.startChargement();
70
		for (int i = 0; i < observations.size(); i++) {
-
 
71
			Panel imagePanel = new VerticalPanel();
-
 
72
			imagePanels.add(imagePanel);
-
 
73
			vue.addImagePanel(imagePanel);
-
 
Line 74... Line 66...
74
		}
66
		vue.chargerPanneauxObservation(observations);
75
 
-
 
76
		vue.afficherPanneauxImage(0, vue.getNbImagesPerPage());
-
 
77
 
-
 
78
		Iterator<Panel> panelIterator = imagePanels.iterator();
-
 
79
		for (Observation observation : observations) {
-
 
80
			Panel imagePanel = panelIterator.next();
-
 
81
			new ObservationPresenteur(observation).go(imagePanel);
-
 
82
		}
67
 
Line 83... Line 68...
83
 
68
		vue.afficherPanneauxImage(0, vue.getNbImagesPerPage());
Line 84... Line 69...
84
		createPaginationWidget(observations.size());
69
		createPaginationWidget(observations.size());