1196 |
gduche |
1 |
package org.tela_botanica.del.client.vues.identiplante.resultats.votes;
|
|
|
2 |
|
|
|
3 |
import org.tela_botanica.del.client.composants.votes.barrerepartition.BarreRepartitionVotePresenteur;
|
|
|
4 |
import org.tela_botanica.del.client.composants.votes.barrerepartition.BarreRepartitionVoteVue;
|
|
|
5 |
import org.tela_botanica.del.client.modeles.MoyenneVote;
|
|
|
6 |
import org.tela_botanica.del.client.modeles.PropositionDetermination;
|
|
|
7 |
import org.tela_botanica.del.client.services.CalculVoteDeterminationService;
|
|
|
8 |
import org.tela_botanica.del.client.services.rest.VoteDeterminationServiceConcret;
|
|
|
9 |
|
|
|
10 |
import com.google.gwt.user.client.ui.HasWidgets;
|
|
|
11 |
import com.google.gwt.user.client.ui.IsWidget;
|
|
|
12 |
|
|
|
13 |
public class DetailVoteObservationPresenteur {
|
|
|
14 |
|
|
|
15 |
public interface Vue extends IsWidget {
|
|
|
16 |
public HasWidgets getZoneCertitude();
|
|
|
17 |
|
|
|
18 |
public HasWidgets getZoneCommentaires();
|
|
|
19 |
|
|
|
20 |
public HasWidgets getZoneNomEspece();
|
|
|
21 |
|
|
|
22 |
public HasWidgets getZoneVoter();
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
private Vue vue;
|
|
|
26 |
private PropositionDetermination proposition;
|
|
|
27 |
|
|
|
28 |
public DetailVoteObservationPresenteur(Vue vue, PropositionDetermination proposition) {
|
|
|
29 |
this.vue = vue;
|
|
|
30 |
this.proposition = proposition;
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
public void go(HasWidgets composite) {
|
|
|
34 |
composite.add(vue.asWidget());
|
|
|
35 |
BarreRepartitionVotePresenteur presenteurVote = new BarreRepartitionVotePresenteur(new BarreRepartitionVoteVue(), new VoteDeterminationServiceConcret());
|
|
|
36 |
MoyenneVote moyenne = CalculVoteDeterminationService.calculerVoteDetermination(proposition);
|
|
|
37 |
presenteurVote.afficherVotes(moyenne);
|
|
|
38 |
presenteurVote.go(vue.getZoneCertitude());
|
|
|
39 |
}
|
|
|
40 |
|
|
|
41 |
}
|