| Line 1... |
Line 1... |
| 1 |
package org.tela_botanica.del.client.vues.plateformedetermination;
|
1 |
package org.tela_botanica.del.client.vues.plateformedetermination;
|
| Line 2... |
Line 2... |
| 2 |
|
2 |
|
| Line 3... |
Line 3... |
| 3 |
import java.util.List;
|
3 |
import java.util.List;
|
| - |
|
4 |
|
| 4 |
|
5 |
import org.tela_botanica.del.client.cache.CacheClient;
|
| 5 |
import org.tela_botanica.del.client.cache.CacheClient;
|
6 |
import org.tela_botanica.del.client.composants.presenteur.Presenteur;
|
| 6 |
import org.tela_botanica.del.client.modeles.MoyenneVote;
|
7 |
import org.tela_botanica.del.client.modeles.MoyenneVote;
|
| 7 |
import org.tela_botanica.del.client.modeles.VoteDetermination;
|
8 |
import org.tela_botanica.del.client.modeles.VoteDetermination;
|
| 8 |
import org.tela_botanica.del.client.navigation.evenement.BusEvenementiel;
|
9 |
import org.tela_botanica.del.client.navigation.evenement.BusEvenementiel;
|
| Line 16... |
Line 17... |
| 16 |
import org.tela_botanica.del.client.vues.plateformedetermination.formulairerechercheeflore.FormulaireRechercheEflorePresenteur;
|
17 |
import org.tela_botanica.del.client.vues.plateformedetermination.formulairerechercheeflore.FormulaireRechercheEflorePresenteur;
|
| 17 |
import org.tela_botanica.del.client.vues.plateformedetermination.forum.ForumPresenteur;
|
18 |
import org.tela_botanica.del.client.vues.plateformedetermination.forum.ForumPresenteur;
|
| 18 |
import org.tela_botanica.del.client.vues.plateformedetermination.vote.EnsembleVotesPresenteur;
|
19 |
import org.tela_botanica.del.client.vues.plateformedetermination.vote.EnsembleVotesPresenteur;
|
| 19 |
import org.tela_botanica.del.client.vues.plateformedetermination.vote.barrerepartition.BarreRepartitionVotePresenteur;
|
20 |
import org.tela_botanica.del.client.vues.plateformedetermination.vote.barrerepartition.BarreRepartitionVotePresenteur;
|
| Line -... |
Line 21... |
| - |
|
21 |
|
| - |
|
22 |
import com.google.gwt.event.dom.client.ClickEvent;
|
| 20 |
|
23 |
import com.google.gwt.event.dom.client.ClickHandler;
|
| Line 21... |
Line 24... |
| 21 |
import com.google.gwt.user.client.ui.HasWidgets;
|
24 |
import com.google.gwt.user.client.ui.HasWidgets;
|
| Line 22... |
Line -... |
| 22 |
|
- |
|
| 23 |
public class DeterminationPresenteur {
|
25 |
|
| Line 24... |
Line 26... |
| 24 |
|
26 |
public class DeterminationPresenteur extends Presenteur {
|
| 25 |
DeterminationVue determinationVue = new DeterminationVue();
|
- |
|
| - |
|
27 |
|
| 26 |
BarreRepartitionVotePresenteur barreRepartitionVotePresenteur;
|
28 |
BarreRepartitionVotePresenteur barreRepartitionVotePresenteur;
|
| Line 27... |
Line 29... |
| 27 |
|
29 |
|
| Line -... |
Line 30... |
| - |
|
30 |
public DeterminationPresenteur() {
|
| - |
|
31 |
super(new DeterminationVue());
|
| 28 |
public DeterminationPresenteur() {
|
32 |
}
|
| 29 |
|
33 |
|
| 30 |
}
|
34 |
public void go(HasWidgets composite) {
|
| 31 |
|
- |
|
| 32 |
public void go(HasWidgets composite) {
|
35 |
|
| Line 33... |
Line 36... |
| 33 |
|
36 |
DeterminationVue determinationVue = (DeterminationVue)getVue();
|
| 34 |
new DetailImageObservationPresenteur().go(determinationVue.getDetailImageObservation());
|
37 |
|
| 35 |
new EnsembleVotesPresenteur().go(determinationVue.getVote());
|
38 |
new DetailImageObservationPresenteur().go(determinationVue.getDetailImageObservation());
|
| Line 54... |
Line 57... |
| 54 |
}
|
57 |
}
|
| 55 |
}
|
58 |
}
|
| Line 56... |
Line 59... |
| 56 |
|
59 |
|
| 57 |
public void gererEvenements() {
|
60 |
public void gererEvenements() {
|
| 58 |
BusEvenementiel.getInstance().addHandler(EvenementVoteDetermination.TYPE, new GestionnaireEvenementVoteDetermination() {
|
- |
|
| 59 |
|
61 |
BusEvenementiel.getInstance().addHandler(EvenementVoteDetermination.TYPE, new GestionnaireEvenementVoteDetermination() {
|
| 60 |
@Override
|
62 |
@Override
|
| 61 |
public void onVoteDetermination(VoteDetermination event) {
|
63 |
public void onVoteDetermination(VoteDetermination event) {
|
| 62 |
calculerEtAfficherVoteDeterminationPlusPopulaire();
|
64 |
calculerEtAfficherVoteDeterminationPlusPopulaire();
|
| 63 |
}
|
65 |
}
|
| - |
|
66 |
});
|
| - |
|
67 |
|
| - |
|
68 |
((DeterminationVue)getVue()).getBoutonAjoutProposition().addClickHandler(new ClickHandler() {
|
| - |
|
69 |
@Override
|
| - |
|
70 |
public void onClick(ClickEvent event) {
|
| - |
|
71 |
|
| - |
|
72 |
ouvrirFenetreModale(new FormulairePropositionPresenteur());
|
| - |
|
73 |
}
|
| - |
|
74 |
});
|
| - |
|
75 |
|
| - |
|
76 |
BusEvenementiel.getInstance().addHandler(EvenementAjoutDetermination.TYPE, new GestionnaireEvenementAjoutDetermination() {
|
| - |
|
77 |
|
| - |
|
78 |
@Override
|
| - |
|
79 |
public void onAjoutDetermination(EvenementAjoutDetermination event) {
|
| - |
|
80 |
if(fenetreModaleEstOuverte()) {
|
| - |
|
81 |
fermerFenetreModale();
|
| - |
|
82 |
}
|
| - |
|
83 |
}
|
| 64 |
});
|
84 |
});
|
| 65 |
}
|
85 |
}
|