652 |
aurelien |
1 |
package org.tela_botanica.del.client.vues.rechercheobservations.resultats.observationdeterminations;
|
|
|
2 |
|
901 |
aurelien |
3 |
import org.tela_botanica.del.client.i18n.I18n;
|
|
|
4 |
|
652 |
aurelien |
5 |
import com.google.gwt.core.client.GWT;
|
901 |
aurelien |
6 |
import com.google.gwt.event.dom.client.HasClickHandlers;
|
652 |
aurelien |
7 |
import com.google.gwt.uibinder.client.UiBinder;
|
|
|
8 |
import com.google.gwt.uibinder.client.UiField;
|
|
|
9 |
import com.google.gwt.user.client.ui.Composite;
|
901 |
aurelien |
10 |
import com.google.gwt.user.client.ui.FocusPanel;
|
882 |
aurelien |
11 |
import com.google.gwt.user.client.ui.HTML;
|
652 |
aurelien |
12 |
import com.google.gwt.user.client.ui.HTMLPanel;
|
|
|
13 |
import com.google.gwt.user.client.ui.IsWidget;
|
|
|
14 |
import com.google.gwt.user.client.ui.Widget;
|
|
|
15 |
|
|
|
16 |
public class LignePropositionVue extends Composite {
|
|
|
17 |
|
|
|
18 |
// Gestion d'UiBinder
|
|
|
19 |
interface MyUiBinder extends UiBinder<Widget, LignePropositionVue> {
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
private static MyUiBinder uibinder = GWT.create(MyUiBinder.class);
|
|
|
23 |
@UiField
|
901 |
aurelien |
24 |
HTMLPanel conteneurPanneauDeterminations, conteneurPanneauCommentaires;
|
652 |
aurelien |
25 |
|
882 |
aurelien |
26 |
@UiField
|
901 |
aurelien |
27 |
FocusPanel conteneurPanneauVotes;
|
|
|
28 |
|
|
|
29 |
@UiField
|
882 |
aurelien |
30 |
HTML nbVotesHtml, nbCommentairesHtml;
|
|
|
31 |
|
|
|
32 |
public LignePropositionVue(IsWidget panneauDeterminations, int nbVotes, int nbCommentaires) {
|
652 |
aurelien |
33 |
initWidget(uibinder.createAndBindUi(this));
|
882 |
aurelien |
34 |
|
652 |
aurelien |
35 |
conteneurPanneauDeterminations.add(panneauDeterminations);
|
901 |
aurelien |
36 |
nbVotesHtml.setHTML(nbVotes+"");
|
882 |
aurelien |
37 |
nbCommentairesHtml = new HTML(nbCommentaires+"");
|
|
|
38 |
|
901 |
aurelien |
39 |
conteneurPanneauVotes.setTitle(I18n.getVocabulary().voirDetailVotes());
|
|
|
40 |
|
882 |
aurelien |
41 |
conteneurPanneauCommentaires.add(nbCommentairesHtml);
|
652 |
aurelien |
42 |
}
|
882 |
aurelien |
43 |
|
901 |
aurelien |
44 |
public HasClickHandlers getZoneNbVotes() {
|
|
|
45 |
return conteneurPanneauVotes;
|
|
|
46 |
}
|
|
|
47 |
|
882 |
aurelien |
48 |
public void setNbVotes(int nbVotes) {
|
|
|
49 |
nbVotesHtml.setHTML(nbVotes+"");
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
public void setNbCommentaires(int nbCommentaires) {
|
|
|
53 |
nbCommentairesHtml.setHTML(nbCommentaires+"");
|
|
|
54 |
}
|
652 |
aurelien |
55 |
}
|