Subversion Repositories eFlore/Applications.del

Rev

Rev 123 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 123 Rev 148
Line 1... Line 1...
1
package org.tela_botanica.del.client.vues.rechercheobservations;
1
package org.tela_botanica.del.client.vues.rechercheimages;
Line 2... Line 2...
2
 
2
 
Line -... Line 3...
-
 
3
import java.util.List;
3
import java.util.List;
4
 
4
 
5
import org.tela_botanica.del.client.modeles.Image;
5
import org.tela_botanica.del.client.modeles.Observation;
6
import org.tela_botanica.del.client.modeles.Observation;
6
import org.tela_botanica.del.client.modeles.ObservationValidation;
7
import org.tela_botanica.del.client.modeles.VoteProtocole;
7
import org.tela_botanica.del.client.navigation.evenement.BusEvenementiel;
8
import org.tela_botanica.del.client.navigation.evenement.BusEvenementiel;
8
import org.tela_botanica.del.client.navigation.evenement.validationobservation.EvenementValidation;
9
import org.tela_botanica.del.client.navigation.evenement.validationobservation.EvenementValidation;
Line 9... Line 10...
9
import org.tela_botanica.del.client.utils.MockDatasource;
10
import org.tela_botanica.del.client.utils.MockDatasource;
10
import org.tela_botanica.del.client.vues.rechercheobservations.vote.MoyenneVotePresenteur;
11
import org.tela_botanica.del.client.vues.rechercheimages.vote.MoyenneVotePresenteur;
11
 
12
 
12
import com.google.gwt.event.dom.client.ClickEvent;
13
import com.google.gwt.event.dom.client.ClickEvent;
13
import com.google.gwt.event.dom.client.ClickHandler;
14
import com.google.gwt.event.dom.client.ClickHandler;
Line 14... Line 15...
14
import com.google.gwt.user.client.ui.HasWidgets;
15
import com.google.gwt.user.client.ui.HasWidgets;
Line 15... Line 16...
15
import com.google.gwt.user.client.ui.Label;
16
import com.google.gwt.user.client.ui.Label;
16
import com.google.gwt.user.client.ui.VerticalPanel;
17
import com.google.gwt.user.client.ui.VerticalPanel;
17
 
18
 
18
public class ObservationPresenteur {
19
public class ImagePresenteur {
Line 19... Line 20...
19
 
20
 
20
	private final MockDatasource validationService = MockDatasource.getInstance();
21
	private final MockDatasource validationService = MockDatasource.getInstance();
21
	private ObservationVue vue = new ObservationVue();
22
	private ImageVue vue = new ImageVue();
Line 22... Line 23...
22
	private final Observation observation;
23
	private final Image image;
23
	private boolean detailsOpen = false;
24
	private boolean detailsOpen = false;
24
 
25
 
25
	public ObservationPresenteur(Observation observation) {
26
	public ImagePresenteur(Image image) {
26
		this.observation = observation;
27
		this.image = image;
Line 27... Line 28...
27
	}
28
	}
Line 28... Line 29...
28
 
29
 
Line 29... Line 30...
29
	public void go(HasWidgets composite) {
30
	public void go(HasWidgets composite) {
30
		composite.add(vue);
31
		composite.add(vue);
31
		vue.loadImage(observation);
32
		vue.loadImage(image);
32
		loadValidationData();
33
		loadValidationData();
Line 33... Line 34...
33
		handleEvents();
34
		handleEvents();
Line 34... Line 35...
34
 
35
 
Line 61... Line 62...
61
 
62
 
Line 62... Line 63...
62
		vue.getAjoutValidation().addClickHandler(new ClickHandler() {
63
		vue.getAjoutValidation().addClickHandler(new ClickHandler() {
63
 
64
 
64
			@Override
65
			@Override
65
			public void onClick(ClickEvent event) {
66
			public void onClick(ClickEvent event) {
66
				BusEvenementiel.getInstance().fireEvent(new EvenementValidation(observation));
67
				BusEvenementiel.getInstance().fireEvent(new EvenementValidation(image));
67
			}
68
			}
Line 68... Line 69...
68
		});
69
		});
Line 77... Line 78...
77
 
78
 
78
		detailsOpen = false;
79
		detailsOpen = false;
Line 79... Line 80...
79
	}
80
	}
80
 
81
 
Line 81... Line 82...
81
	public void afficherDetails() {
82
	public void afficherDetails() {
82
		ObservationRecherchePresenteur.getInstance().fermerTousPanneauxDetailsObservations();
83
		ImageRecherchePresenteur.getInstance().fermerTousPanneauxDetailsObservations();
Line 83... Line 84...
83
 
84
 
Line 92... Line 93...
92
 
93
 
93
	public boolean isDetailsOpen() {
94
	public boolean isDetailsOpen() {
94
		return detailsOpen;
95
		return detailsOpen;
Line 95... Line 96...
95
	}
96
	}
96
 
97
 
97
	public ObservationVue getVue() {
98
	public ImageVue getVue() {
98
		return vue;
99
		return vue;