Subversion Repositories eFlore/Applications.del

Rev

Rev 649 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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