Rev 187 | Blame | Last modification | View Log | RSS feed
package org.tela_botanica.del.client.vues.plateformedetermination.forum;
import org.tela_botanica.del.client.modeles.MoyenneVote;
import org.tela_botanica.del.client.modeles.PropositionDetermination;
import org.tela_botanica.del.client.services.CalculVoteDeterminationService;
import org.tela_botanica.del.client.vues.plateformedetermination.vote.barrerepartition.BarreRepartitionVotePresenteur;
import com.google.gwt.user.client.ui.FlexTable;
public class LigneForumPresenteur {
private LigneForumVue ligneforumVue;
private BarreRepartitionVotePresenteur barreRepartitionVotePresenteur = new BarreRepartitionVotePresenteur();
private PropositionDetermination determination;
public LigneForumPresenteur(PropositionDetermination propositionDetermination) {
this.determination = propositionDetermination;
}
public void go(FlexTable tableParente) {
ligneforumVue = new LigneForumVue(tableParente);
chargerDetermination();
}
private void chargerDetermination() {
calculerEtAfficherVoteDetermination();
ligneforumVue.chargerDetermination(determination,barreRepartitionVotePresenteur.getBarreRepartitionVoteVue());
}
private void calculerEtAfficherVoteDetermination() {
MoyenneVote votes = CalculVoteDeterminationService.calculerVoteDetermination(determination);
barreRepartitionVotePresenteur.afficherVotes(votes);
}
}