Subversion Repositories eFlore/Applications.del

Rev

Rev 959 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
650 gduche 1
package org.tela_botanica.del.client.vues.plateformedetermination.ligneProtocole;
649 gduche 2
 
3
import org.tela_botanica.del.client.cache.CacheClient;
4
import org.tela_botanica.del.client.composants.votes.moyennevotes.MoyenneVotePresenteur;
5
import org.tela_botanica.del.client.composants.votes.moyennevotes.MoyenneVoteVue;
848 aurelien 6
import org.tela_botanica.del.client.modeles.Image;
649 gduche 7
import org.tela_botanica.del.client.modeles.Protocole;
959 benjamin 8
import org.tela_botanica.del.client.services.rest.VoteProtocoleServiceConcret;
9
 
649 gduche 10
import com.google.gwt.user.client.ui.HasWidgets;
11
import com.google.gwt.user.client.ui.IsWidget;
12
 
13
public class LigneProtocolePresenteur {
14
 
15
	public interface Vue extends IsWidget {
16
 
17
		void setNom(String nom);
959 benjamin 18
 
649 gduche 19
		HasWidgets getZoneVote();
20
	}
21
 
22
	private Vue vue;
23
	private Protocole protocole;
24
 
25
	public LigneProtocolePresenteur(Protocole protocole, Vue vue) {
26
		this.vue = vue;
27
		this.protocole = protocole;
28
		setNom(protocole.getNom());
848 aurelien 29
		Image imageCourante = CacheClient.getInstance().getImageCourante();
959 benjamin 30
		MoyenneVotePresenteur votePresenteur = new MoyenneVotePresenteur(imageCourante, protocole, new MoyenneVoteVue(), new VoteProtocoleServiceConcret());
649 gduche 31
		votePresenteur.go(vue.getZoneVote());
32
	}
33
 
34
	public void setNom(String nom) {
35
		vue.setNom(nom);
36
	}
959 benjamin 37
 
649 gduche 38
	public Vue getVue() {
39
		return vue;
40
	}
959 benjamin 41
 
649 gduche 42
	public void go(HasWidgets composite) {
43
		composite.add(vue.asWidget());
44
	}
45
}