| Line 52... |
Line 52... |
| 52 |
|
52 |
|
| Line 53... |
Line 53... |
| 53 |
public HasWidgets getPanneauPagination();
|
53 |
public HasWidgets getPanneauPagination();
|
| Line 54... |
Line 54... |
| 54 |
|
54 |
|
| Line 55... |
Line 55... |
| 55 |
public HasWidgets getPanneauPaginationHaut();
|
55 |
public HasWidgets getPanneauPaginationHaut();
|
| Line 56... |
Line 56... |
| 56 |
|
56 |
|
| Line 57... |
Line 57... |
| 57 |
public HasClickHandlers getTriParNbVotesAscendant();
|
57 |
public HasClickHandlers getTriParMoyenneArithmetiqueAscendant();
|
| Line 74... |
Line 74... |
| 74 |
|
74 |
|
| Line 75... |
Line 75... |
| 75 |
public void afficherElementsResultatsTrouve();
|
75 |
public void afficherElementsResultatsTrouve();
|
| Line 76... |
Line 76... |
| 76 |
|
76 |
|
| Line 77... |
Line 77... |
| 77 |
public HTMLPanel getImageTable();
|
77 |
public HTMLPanel getImageTable();
|
| Line 78... |
Line 78... |
| 78 |
|
78 |
|
| Line 79... |
Line 79... |
| 79 |
public HasClickHandlers getLabelVote();
|
79 |
public HasClickHandlers getLabelMoyenneArithmetique();
|
| Line 80... |
Line 80... |
| 80 |
|
80 |
|
| Line 81... |
Line 81... |
| 81 |
public void masquerVoteAscendant();
|
81 |
public void masquerMoyenneArithmetiqueAscendant();
|
| Line 82... |
Line 82... |
| 82 |
|
82 |
|
| Line 119... |
Line 119... |
| 119 |
}
|
119 |
}
|
| Line 120... |
Line 120... |
| 120 |
|
120 |
|
| 121 |
private Vue vue;
|
121 |
private Vue vue;
|
| 122 |
private ImageService imageService;
|
122 |
private ImageService imageService;
|
| 123 |
private final ProtocoleService protocoleService;
|
123 |
private final ProtocoleService protocoleService;
|
| 124 |
private ModeTri triCourantVote = ModeTri.TRI_ASCENDANT;
|
124 |
private ModeTri triCourantMoyenneArithmetique = ModeTri.TRI_ASCENDANT;
|
| 125 |
private ModeTri triCourantPoints = ModeTri.TRI_ASCENDANT;
|
125 |
private ModeTri triCourantPoints = ModeTri.TRI_ASCENDANT;
|
| 126 |
private ModeTri triCourantDate = ModeTri.TRI_DESCENDANT;
|
126 |
private ModeTri triCourantDate = ModeTri.TRI_DESCENDANT;
|
| Line 127... |
Line 127... |
| 127 |
private ModeTri triCourantTag = ModeTri.TRI_DESCENDANT;
|
127 |
private ModeTri triCourantTag = ModeTri.TRI_DESCENDANT;
|
| Line 135... |
Line 135... |
| 135 |
public void go(HasWidgets composite) {
|
135 |
public void go(HasWidgets composite) {
|
| 136 |
composite.add(vue.asWidget());
|
136 |
composite.add(vue.asWidget());
|
| 137 |
vue.startChargement();
|
137 |
vue.startChargement();
|
| 138 |
rechercherImagesEtCreerWidgetPagination();
|
138 |
rechercherImagesEtCreerWidgetPagination();
|
| 139 |
gererEvenements();
|
139 |
gererEvenements();
|
| 140 |
vue.masquerVoteDescendant();
|
140 |
vue.masquerMoyenneArithmetiqueDescendant();
|
| 141 |
vue.masquerVoteAscendant();
|
141 |
vue.masquerMoyenneArithmetiqueAscendant();
|
| 142 |
vue.masquerDateDescendant();
|
142 |
vue.masquerDateDescendant();
|
| 143 |
vue.masquerDateAscendant();
|
143 |
vue.masquerDateAscendant();
|
| 144 |
vue.masquerTagAscendant();
|
144 |
vue.masquerTagAscendant();
|
| 145 |
vue.masquerTagDescendant();
|
145 |
vue.masquerTagDescendant();
|
| 146 |
vue.masquerPointsAscendant();
|
146 |
vue.masquerPointsAscendant();
|
| Line 149... |
Line 149... |
| 149 |
initialiserAPartirInfosCache();
|
149 |
initialiserAPartirInfosCache();
|
| 150 |
}
|
150 |
}
|
| Line 151... |
Line 151... |
| 151 |
|
151 |
|
| 152 |
private void initialiserAPartirInfosCache() {
|
152 |
private void initialiserAPartirInfosCache() {
|
| 153 |
InformationsRecherche infos = CacheClient.getInstance().getInformationsRechercheImage();
|
153 |
InformationsRecherche infos = CacheClient.getInstance().getInformationsRechercheImage();
|
| 154 |
if(infos.getTriParDate() != ModeTri.PAS_DE_TRI) {
|
154 |
if (infos.getTriParDate() != ModeTri.PAS_DE_TRI) {
|
| 155 |
mettreAJourAffichageTriDate();
|
155 |
mettreAJourAffichageTriDate();
|
| Line 156... |
Line 156... |
| 156 |
}
|
156 |
}
|
| 157 |
|
157 |
|
| 158 |
if(infos.getTriParNbVotes() != ModeTri.PAS_DE_TRI) {
|
158 |
if (infos.getTriParMoyenneArithmetique() != ModeTri.PAS_DE_TRI) {
|
| Line 159... |
Line 159... |
| 159 |
mettreAJourAffichageTriVote();
|
159 |
mettreAJourAffichageTriMoyenneArithmetique();
|
| 160 |
}
|
160 |
}
|
| 161 |
|
161 |
|
| 162 |
if(infos.getTriParNbTags() != ModeTri.PAS_DE_TRI) {
|
- |
|
| 163 |
mettreAjourAffichageTriTag();
|
162 |
if (infos.getTriParNbTags() != ModeTri.PAS_DE_TRI) {
|
| Line 164... |
Line 163... |
| 164 |
}
|
163 |
mettreAjourAffichageTriTag();
|
| 165 |
|
164 |
}
|
| 166 |
}
|
165 |
}
|
| 167 |
|
166 |
|
| 168 |
public void gererEvenements() {
|
167 |
public void gererEvenements() {
|
| 169 |
ClickHandler surClicTriVote = new ClickHandler() {
|
168 |
ClickHandler surClicTriMoyenneArithmetique = new ClickHandler() {
|
| 170 |
@Override
|
169 |
@Override
|
| Line 171... |
Line 170... |
| 171 |
public void onClick(ClickEvent event) {
|
170 |
public void onClick(ClickEvent event) {
|
| 172 |
surClicTriVote();
|
171 |
surClicTriMoyenneArithmetique();
|
| 173 |
}
|
172 |
}
|
| Line 174... |
Line 173... |
| 174 |
};
|
173 |
};
|
| 175 |
|
174 |
|
| 176 |
vue.getLabelVote().addClickHandler(surClicTriVote);
|
175 |
vue.getLabelMoyenneArithmetique().addClickHandler(surClicTriMoyenneArithmetique);
|
| 177 |
vue.getTriParNbVotesAscendant().addClickHandler(surClicTriVote);
|
176 |
vue.getTriParMoyenneArithmetiqueAscendant().addClickHandler(surClicTriMoyenneArithmetique);
|
| Line 212... |
Line 211... |
| 212 |
|
211 |
|
| 213 |
BusEvenementiel.getInstance().addHandler(EvenementChangementProtocole.TYPE, new GestionnaireEvenementChangementProtocole() {
|
212 |
BusEvenementiel.getInstance().addHandler(EvenementChangementProtocole.TYPE, new GestionnaireEvenementChangementProtocole() {
|
| 214 |
@Override
|
213 |
@Override
|
| 215 |
public void onChangementProtocole(EvenementChangementProtocole event) {
|
214 |
public void onChangementProtocole(EvenementChangementProtocole event) {
|
| 216 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
215 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
| 217 |
if (informationsRechercheImages.getTriParNbVotes() != ModeTri.PAS_DE_TRI) {
|
216 |
if (informationsRechercheImages.getTriParMoyenneArithmetique() != ModeTri.PAS_DE_TRI) {
|
| 218 |
informationsRechercheImages.setIdProtocoleSelectionne(event.getProtocole().getId() + "");
|
217 |
informationsRechercheImages.setIdProtocoleSelectionne(event.getProtocole().getId() + "");
|
| 219 |
chargerEtAfficherImagesPageEnCours();
|
218 |
chargerEtAfficherImagesPageEnCours();
|
| 220 |
}
|
219 |
}
|
| 221 |
}
|
220 |
}
|
| 222 |
});
|
221 |
});
|
| Line 223... |
Line 222... |
| 223 |
}
|
222 |
}
|
| - |
|
223 |
|
| 224 |
|
224 |
protected void surClicTriTag() {
|
| 225 |
protected void surClicTriTag() {
|
225 |
triCourantTag = (triCourantTag == ModeTri.TRI_ASCENDANT) ? ModeTri.TRI_DESCENDANT : ModeTri.TRI_ASCENDANT;
|
| 226 |
mettreAjourAffichageTriTag();
|
226 |
mettreAjourAffichageTriTag();
|
| 227 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
227 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
| 228 |
informationsRechercheImages.setTriParNbTags(triCourantTag);
|
228 |
informationsRechercheImages.setTriParNbTags(triCourantTag);
|
| 229 |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
|
229 |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
|
| 230 |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
|
230 |
informationsRechercheImages.setTriParMoyenneArithmetique(ModeTri.PAS_DE_TRI);
|
| 231 |
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
|
231 |
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
|
| Line 232... |
Line 232... |
| 232 |
chargerEtAfficherImagesPageEnCours();
|
232 |
chargerEtAfficherImagesPageEnCours();
|
| 233 |
}
|
233 |
}
|
| 234 |
|
234 |
|
| 235 |
private void mettreAjourAffichageTriTag() {
|
235 |
private void mettreAjourAffichageTriTag() {
|
| 236 |
vue.masquerDateDescendant();
|
236 |
vue.masquerDateDescendant();
|
| 237 |
vue.masquerDateAscendant();
|
237 |
vue.masquerDateAscendant();
|
| 238 |
vue.masquerVoteDescendant();
|
238 |
vue.masquerMoyenneArithmetiqueDescendant();
|
| 239 |
vue.masquerVoteAscendant();
|
239 |
vue.masquerMoyenneArithmetiqueAscendant();
|
| 240 |
vue.masquerPointsAscendant();
|
- |
|
| 241 |
vue.masquerPointsDescendant();
|
- |
|
| 242 |
if (triCourantTag == ModeTri.TRI_ASCENDANT) {
|
- |
|
| 243 |
triCourantTag = ModeTri.TRI_DESCENDANT;
|
- |
|
| 244 |
vue.masquerTagAscendant();
|
- |
|
| 245 |
vue.afficherTagDescendant();
|
240 |
vue.masquerPointsAscendant();
|
| 246 |
} else {
|
241 |
vue.masquerPointsDescendant();
|
| - |
|
242 |
if (triCourantTag == ModeTri.TRI_ASCENDANT) {
|
| - |
|
243 |
vue.masquerTagDescendant();
|
| - |
|
244 |
vue.afficherTagAscendant();
|
| 247 |
triCourantTag = ModeTri.TRI_ASCENDANT;
|
245 |
} else {
|
| 248 |
vue.masquerTagDescendant();
|
246 |
vue.masquerTagAscendant();
|
| Line 249... |
Line 247... |
| 249 |
vue.afficherTagAscendant();
|
247 |
vue.afficherTagDescendant();
|
| - |
|
248 |
}
|
| 250 |
}
|
249 |
}
|
| 251 |
}
|
250 |
|
| 252 |
|
251 |
public void surClicTriMoyenneArithmetique() {
|
| 253 |
public void surClicTriVote() {
|
252 |
triCourantMoyenneArithmetique = (triCourantMoyenneArithmetique == ModeTri.TRI_ASCENDANT) ? ModeTri.TRI_DESCENDANT : ModeTri.TRI_ASCENDANT;
|
| 254 |
mettreAJourAffichageTriVote();
|
253 |
mettreAJourAffichageTriMoyenneArithmetique();
|
| 255 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
254 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
| 256 |
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
|
255 |
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
|
| 257 |
informationsRechercheImages.setTriParNbVotes(triCourantVote);
|
256 |
informationsRechercheImages.setTriParMoyenneArithmetique(triCourantMoyenneArithmetique);
|
| 258 |
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
|
257 |
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
|
| 259 |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
|
258 |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
|
| Line 260... |
Line 259... |
| 260 |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
|
259 |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
|
| 261 |
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
|
260 |
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
|
| 262 |
chargerEtAfficherImagesPageEnCours();
|
261 |
chargerEtAfficherImagesPageEnCours();
|
| 263 |
}
|
262 |
}
|
| 264 |
|
263 |
|
| 265 |
private void mettreAJourAffichageTriVote() {
|
264 |
private void mettreAJourAffichageTriMoyenneArithmetique() {
|
| 266 |
vue.masquerDateDescendant();
|
265 |
vue.masquerDateDescendant();
|
| 267 |
vue.masquerDateAscendant();
|
266 |
vue.masquerDateAscendant();
|
| 268 |
vue.masquerTagAscendant();
|
- |
|
| 269 |
vue.masquerTagDescendant();
|
267 |
vue.masquerTagAscendant();
|
| 270 |
vue.masquerPointsAscendant();
|
268 |
vue.masquerTagDescendant();
|
| 271 |
vue.masquerPointsDescendant();
|
269 |
vue.masquerPointsAscendant();
|
| 272 |
if (triCourantVote == ModeTri.TRI_ASCENDANT) {
|
- |
|
| 273 |
triCourantVote = ModeTri.TRI_DESCENDANT;
|
270 |
vue.masquerPointsDescendant();
|
| 274 |
vue.masquerVoteAscendant();
|
271 |
if (triCourantMoyenneArithmetique == ModeTri.TRI_ASCENDANT) {
|
| 275 |
vue.afficherVoteDescendant();
|
272 |
vue.masquerMoyenneArithmetiqueDescendant();
|
| 276 |
} else {
|
273 |
vue.afficherMoyenneArithmetiqueAscendant();
|
| Line 277... |
Line 274... |
| 277 |
triCourantVote = ModeTri.TRI_ASCENDANT;
|
274 |
} else {
|
| - |
|
275 |
vue.masquerMoyenneArithmetiqueAscendant();
|
| 278 |
vue.masquerVoteDescendant();
|
276 |
vue.afficherMoyenneArithmetiqueDescendant();
|
| 279 |
vue.afficherVoteAscendant();
|
277 |
}
|
| 280 |
}
|
278 |
}
|
| 281 |
}
|
279 |
|
| 282 |
|
280 |
public void surClicTriPoints() {
|
| 283 |
public void surClicTriPoints() {
|
281 |
triCourantPoints = (triCourantPoints == ModeTri.TRI_ASCENDANT) ? ModeTri.TRI_DESCENDANT : ModeTri.TRI_ASCENDANT;
|
| 284 |
mettreAJourAffichageTriPoints();
|
282 |
mettreAJourAffichageTriPoints();
|
| 285 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
283 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
| 286 |
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
|
284 |
int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
|
| 287 |
informationsRechercheImages.setTriParNbPoints(triCourantPoints);
|
285 |
informationsRechercheImages.setTriParNbPoints(triCourantPoints);
|
| Line 288... |
Line 286... |
| 288 |
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
|
286 |
informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
|
| 289 |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
|
287 |
informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
|
| 290 |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
|
288 |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
|
| 291 |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
|
289 |
informationsRechercheImages.setTriParMoyenneArithmetique(ModeTri.PAS_DE_TRI);
|
| 292 |
chargerEtAfficherImagesPageEnCours();
|
290 |
chargerEtAfficherImagesPageEnCours();
|
| 293 |
}
|
291 |
}
|
| 294 |
|
292 |
|
| 295 |
private void mettreAJourAffichageTriPoints() {
|
293 |
private void mettreAJourAffichageTriPoints() {
|
| 296 |
vue.masquerDateDescendant();
|
- |
|
| 297 |
vue.masquerDateAscendant();
|
- |
|
| 298 |
vue.masquerTagAscendant();
|
- |
|
| 299 |
vue.masquerTagDescendant();
|
- |
|
| 300 |
vue.masquerVoteAscendant();
|
- |
|
| 301 |
vue.masquerVoteDescendant();
|
294 |
vue.masquerDateDescendant();
|
| 302 |
if (triCourantPoints == ModeTri.TRI_ASCENDANT) {
|
295 |
vue.masquerDateAscendant();
|
| - |
|
296 |
vue.masquerTagAscendant();
|
| - |
|
297 |
vue.masquerTagDescendant();
|
| - |
|
298 |
vue.masquerMoyenneArithmetiqueAscendant();
|
| 303 |
triCourantPoints = ModeTri.TRI_DESCENDANT;
|
299 |
vue.masquerMoyenneArithmetiqueDescendant();
|
| 304 |
vue.masquerPointsAscendant();
|
300 |
if (triCourantPoints == ModeTri.TRI_ASCENDANT) {
|
| Line 305... |
Line 301... |
| 305 |
vue.afficherPointsDescendant();
|
301 |
vue.masquerPointsDescendant();
|
| - |
|
302 |
vue.afficherPointsAscendant();
|
| 306 |
} else {
|
303 |
} else {
|
| 307 |
triCourantPoints = ModeTri.TRI_ASCENDANT;
|
304 |
vue.masquerPointsAscendant();
|
| 308 |
vue.masquerPointsDescendant();
|
305 |
vue.afficherPointsDescendant();
|
| 309 |
vue.afficherPointsAscendant();
|
306 |
}
|
| 310 |
}
|
307 |
}
|
| 311 |
}
|
308 |
|
| 312 |
|
309 |
public void surClicTriDate() {
|
| 313 |
public void surClicTriDate() {
|
310 |
triCourantDate = (triCourantDate == ModeTri.TRI_ASCENDANT) ? ModeTri.TRI_DESCENDANT : ModeTri.TRI_ASCENDANT;
|
| Line 314... |
Line 311... |
| 314 |
mettreAJourAffichageTriDate();
|
311 |
mettreAJourAffichageTriDate();
|
| 315 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
312 |
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
|
| 316 |
informationsRechercheImages.setTriParDate(triCourantDate);
|
313 |
informationsRechercheImages.setTriParDate(triCourantDate);
|
| 317 |
informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
|
314 |
informationsRechercheImages.setTriParMoyenneArithmetique(ModeTri.PAS_DE_TRI);
|
| 318 |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
|
315 |
informationsRechercheImages.setTriParNbTags(ModeTri.PAS_DE_TRI);
|
| 319 |
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
|
316 |
informationsRechercheImages.setTriParNbPoints(ModeTri.PAS_DE_TRI);
|
| 320 |
chargerEtAfficherImagesPageEnCours();
|
317 |
chargerEtAfficherImagesPageEnCours();
|
| 321 |
}
|
318 |
}
|
| 322 |
|
- |
|
| 323 |
private void mettreAJourAffichageTriDate() {
|
- |
|
| 324 |
vue.masquerTagAscendant();
|
- |
|
| 325 |
vue.masquerTagDescendant();
|
- |
|
| 326 |
vue.masquerVoteDescendant();
|
- |
|
| 327 |
vue.masquerVoteAscendant();
|
319 |
|
| 328 |
vue.masquerPointsAscendant();
|
320 |
private void mettreAJourAffichageTriDate() {
|
| - |
|
321 |
vue.masquerTagAscendant();
|
| - |
|
322 |
vue.masquerTagDescendant();
|
| - |
|
323 |
vue.masquerMoyenneArithmetiqueDescendant();
|
| 329 |
vue.masquerPointsDescendant();
|
324 |
vue.masquerMoyenneArithmetiqueAscendant();
|
| 330 |
if (triCourantDate == ModeTri.TRI_ASCENDANT) {
|
325 |
vue.masquerPointsAscendant();
|
| Line 331... |
Line 326... |
| 331 |
triCourantDate = ModeTri.TRI_DESCENDANT;
|
326 |
vue.masquerPointsDescendant();
|
| 332 |
vue.masquerDateAscendant();
|
327 |
if (triCourantDate == ModeTri.TRI_ASCENDANT) {
|