Line 1... |
Line 1... |
1 |
package org.tela_botanica.del.client.vues.plateformedetermination.ligneProtocole;
|
1 |
package org.tela_botanica.del.client.vues.plateformedetermination.ligneProtocole;
|
Line 2... |
Line 2... |
2 |
|
2 |
|
- |
|
3 |
import org.tela_botanica.del.client.cache.CacheClient;
|
3 |
import org.tela_botanica.del.client.cache.CacheClient;
|
4 |
import org.tela_botanica.del.client.composants.presenteur.Presenteur;
|
4 |
import org.tela_botanica.del.client.composants.votes.moyennevotes.MoyenneVotePresenteur;
|
5 |
import org.tela_botanica.del.client.composants.votes.moyennevotes.MoyenneVotePresenteur;
|
5 |
import org.tela_botanica.del.client.composants.votes.moyennevotes.MoyenneVoteVue;
|
6 |
import org.tela_botanica.del.client.composants.votes.moyennevotes.MoyenneVoteVue;
|
6 |
import org.tela_botanica.del.client.modeles.Image;
|
7 |
import org.tela_botanica.del.client.modeles.Image;
|
- |
|
8 |
import org.tela_botanica.del.client.modeles.Protocole;
|
- |
|
9 |
import org.tela_botanica.del.client.navigation.evenement.BusEvenementiel;
|
- |
|
10 |
import org.tela_botanica.del.client.navigation.evenement.changementimagevalidation.EvenementChangementImageValidation;
|
7 |
import org.tela_botanica.del.client.modeles.Protocole;
|
11 |
import org.tela_botanica.del.client.navigation.evenement.changementimagevalidation.GestionnaireEvenementChangementImageValidation;
|
Line 8... |
Line 12... |
8 |
import org.tela_botanica.del.client.services.rest.VoteProtocoleServiceConcret;
|
12 |
import org.tela_botanica.del.client.services.rest.VoteProtocoleServiceConcret;
|
9 |
|
13 |
|
Line 10... |
Line 14... |
10 |
import com.google.gwt.user.client.ui.HasWidgets;
|
14 |
import com.google.gwt.user.client.ui.HasWidgets;
|
Line 11... |
Line 15... |
11 |
import com.google.gwt.user.client.ui.IsWidget;
|
15 |
import com.google.gwt.user.client.ui.IsWidget;
|
Line 12... |
Line 16... |
12 |
|
16 |
|
Line 24... |
Line 28... |
24 |
|
28 |
|
25 |
public LigneProtocolePresenteur(Protocole protocole, Vue vue) {
|
29 |
public LigneProtocolePresenteur(Protocole protocole, Vue vue) {
|
26 |
this.vue = vue;
|
30 |
this.vue = vue;
|
27 |
this.protocole = protocole;
|
31 |
this.protocole = protocole;
|
- |
|
32 |
setNom(protocole.getNom());
|
- |
|
33 |
chargerValeursProtocolePourImageCourante();
|
- |
|
34 |
}
|
- |
|
35 |
|
- |
|
36 |
public void chargerValeursProtocolePourImageCourante(){
|
28 |
setNom(protocole.getNom());
|
37 |
vue.getZoneVote().clear();
|
29 |
Image imageCourante = CacheClient.getInstance().getImageCourante();
|
38 |
Image imageCourante = CacheClient.getInstance().getImageCourante();
|
30 |
MoyenneVotePresenteur votePresenteur = new MoyenneVotePresenteur(imageCourante, protocole, new MoyenneVoteVue(), new VoteProtocoleServiceConcret());
|
39 |
MoyenneVotePresenteur votePresenteur = new MoyenneVotePresenteur(imageCourante, protocole, new MoyenneVoteVue(), new VoteProtocoleServiceConcret());
|
31 |
votePresenteur.go(vue.getZoneVote());
|
40 |
votePresenteur.go(vue.getZoneVote());
|
Line 39... |
Line 48... |
39 |
return vue;
|
48 |
return vue;
|
40 |
}
|
49 |
}
|
Line 41... |
Line 50... |
41 |
|
50 |
|
42 |
public void go(HasWidgets composite) {
|
51 |
public void go(HasWidgets composite) {
|
- |
|
52 |
composite.add(vue.asWidget());
|
- |
|
53 |
gererEvenements();
|
- |
|
54 |
}
|
- |
|
55 |
|
- |
|
56 |
@Override
|
- |
|
57 |
protected void gererEvenements() {
|
- |
|
58 |
BusEvenementiel.getInstance().addHandler(EvenementChangementImageValidation.TYPE, new GestionnaireEvenementChangementImageValidation() {
|
- |
|
59 |
|
- |
|
60 |
@Override
|
- |
|
61 |
public void onChangementImage(EvenementChangementImageValidation event) {
|
- |
|
62 |
chargerValeursProtocolePourImageCourante();
|
- |
|
63 |
}
|
43 |
composite.add(vue.asWidget());
|
64 |
});
|
44 |
}
|
65 |
}
|