Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
171 aurelien 1
package org.tela_botanica.del.client.vues.plateformedetermination.forum;
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
 
8
import com.google.gwt.user.client.ui.FlexTable;
9
 
10
public class LigneForumPresenteur {
11
 
12
	private LigneForumVue ligneforumVue;
13
	private BarreRepartitionVotePresenteur barreRepartitionVotePresenteur = new BarreRepartitionVotePresenteur();
14
 
15
	private PropositionDetermination determination;
16
 
17
	public LigneForumPresenteur(PropositionDetermination propositionDetermination) {
18
		this.determination = propositionDetermination;
19
	}
20
 
21
	public void go(FlexTable tableParente) {
22
		ligneforumVue = new LigneForumVue(tableParente);
23
		chargerDetermination();
24
	}
25
 
26
	private void chargerDetermination() {
27
		calculerEtAfficherVoteDetermination();
28
		ligneforumVue.chargerDetermination(determination,barreRepartitionVotePresenteur.getBarreRepartitionVoteVueHTML());
29
	}
30
 
31
	private void calculerEtAfficherVoteDetermination() {
32
 
33
		MoyenneVote votes = CalculVoteDeterminationService.calculerVoteDetermination(determination);
34
		barreRepartitionVotePresenteur.afficherVotes(votes.getScore(), votes.getIntituleAssocie());
35
	}
36
}