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