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