Line 1... |
Line 1... |
1 |
package org.tela_botanica.del.client.vues.plateformedetermination.forum;
|
1 |
package org.tela_botanica.del.client.vues.plateformedetermination.forum;
|
Line 2... |
Line -... |
2 |
|
- |
|
3 |
import java.util.Date;
|
- |
|
4 |
import java.util.List;
|
- |
|
5 |
|
2 |
|
6 |
import org.tela_botanica.del.client.i18n.I18n;
|
3 |
import org.tela_botanica.del.client.i18n.I18n;
|
7 |
import org.tela_botanica.del.client.modeles.Commentaire;
|
4 |
import org.tela_botanica.del.client.modeles.Commentaire;
|
8 |
import org.tela_botanica.del.client.modeles.PropositionDetermination;
|
5 |
import org.tela_botanica.del.client.modeles.PropositionDetermination;
|
Line 9... |
Line 6... |
9 |
import org.tela_botanica.del.client.vues.plateformedetermination.forum.ForumPresenteur.Vue;
|
6 |
import org.tela_botanica.del.client.vues.plateformedetermination.forum.ForumPresenteur.Vue;
|
10 |
|
- |
|
11 |
import com.google.gwt.core.client.GWT;
|
7 |
|
12 |
import com.google.gwt.event.dom.client.HasClickHandlers;
|
8 |
import com.google.gwt.core.client.GWT;
|
13 |
import com.google.gwt.i18n.client.DateTimeFormat;
|
9 |
import com.google.gwt.i18n.client.DateTimeFormat;
|
14 |
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
|
10 |
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
|
15 |
import com.google.gwt.uibinder.client.UiBinder;
|
- |
|
16 |
import com.google.gwt.uibinder.client.UiField;
|
11 |
import com.google.gwt.uibinder.client.UiBinder;
|
17 |
import com.google.gwt.user.client.ui.Button;
|
12 |
import com.google.gwt.uibinder.client.UiField;
|
18 |
import com.google.gwt.user.client.ui.Composite;
|
- |
|
19 |
import com.google.gwt.user.client.ui.FlexTable;
|
- |
|
20 |
import com.google.gwt.user.client.ui.HTML;
|
13 |
import com.google.gwt.user.client.ui.Composite;
|
21 |
import com.google.gwt.user.client.ui.HorizontalPanel;
|
- |
|
22 |
import com.google.gwt.user.client.ui.IsWidget;
|
- |
|
23 |
import com.google.gwt.user.client.ui.Tree;
|
14 |
import com.google.gwt.user.client.ui.FlexTable;
|
Line 24... |
Line 15... |
24 |
import com.google.gwt.user.client.ui.TreeItem;
|
15 |
import com.google.gwt.user.client.ui.IsWidget;
|
Line 25... |
Line 16... |
25 |
import com.google.gwt.user.client.ui.Widget;
|
16 |
import com.google.gwt.user.client.ui.Widget;
|
Line 31... |
Line 22... |
31 |
interface ForumUIiBinder extends UiBinder<Widget, ForumVue> {
|
22 |
interface ForumUIiBinder extends UiBinder<Widget, ForumVue> {
|
32 |
};
|
23 |
};
|
Line 33... |
Line 24... |
33 |
|
24 |
|
34 |
@UiField
|
25 |
@UiField
|
35 |
FlexTable htmlTableau;
|
- |
|
36 |
|
- |
|
Line 37... |
Line 26... |
37 |
|
26 |
FlexTable htmlTableau;
|
38 |
|
27 |
|
39 |
public ForumVue() {
|
28 |
public ForumVue() {
|
Line -... |
Line 29... |
- |
|
29 |
initWidget(uiBinder.createAndBindUi(this));
|
40 |
initWidget(uiBinder.createAndBindUi(this));
|
30 |
}
|
- |
|
31 |
|
41 |
}
|
32 |
/*
|
- |
|
33 |
* (non-Javadoc)
|
42 |
|
34 |
*
|
43 |
/* (non-Javadoc)
|
35 |
* @see org.tela_botanica.del.client.vues.plateformedetermination.forum.Vue#
|
44 |
* @see org.tela_botanica.del.client.vues.plateformedetermination.forum.Vue#initialiserEntetesTableau()
|
36 |
* initialiserEntetesTableau()
|
Line 45... |
Line 37... |
45 |
*/
|
37 |
*/
|
46 |
@Override
|
38 |
@Override
|
47 |
public void initialiserEntetesTableau() {
|
39 |
public void initialiserEntetesTableau() {
|
48 |
|
40 |
|
49 |
htmlTableau.setHTML(1, 1, I18n.getVocabulary().nom());
|
41 |
htmlTableau.setHTML(1, 1, I18n.getVocabulary().nom());
|
50 |
htmlTableau.setHTML(1, 2, I18n.getVocabulary().contributeur());
|
42 |
htmlTableau.setHTML(1, 2, I18n.getVocabulary().contributeur());
|
51 |
htmlTableau.setHTML(1, 3, I18n.getVocabulary().fiabilite());
|
43 |
htmlTableau.setHTML(1, 3, I18n.getVocabulary().fiabilite());
|
52 |
htmlTableau.setHTML(1, 4, I18n.getVocabulary().date());
|
44 |
htmlTableau.setHTML(1, 4, I18n.getVocabulary().date());
|
53 |
htmlTableau.setHTML(1, 5, I18n.getVocabulary().commentaire());
|
45 |
htmlTableau.setHTML(1, 5, I18n.getVocabulary().commentaire());
|
54 |
}
|
46 |
}
|
55 |
|
47 |
|
56 |
@Override
|
48 |
@Override
|
57 |
public void ajouterLigne(PropositionDetermination determination, IsWidget barreRepartition, IsWidget arbreCommentaires) {
|
49 |
public void ajouterLigne(PropositionDetermination determination, IsWidget barreRepartition, IsWidget arbreCommentaires) {
|
58 |
|
50 |
|
- |
|
51 |
int ligne = htmlTableau.getRowCount() + 1;
|
- |
|
52 |
htmlTableau.setWidget(ligne, 1, barreRepartition);
|
- |
|
53 |
htmlTableau.setHTML(ligne, 2, determination.getAuteur());
|
- |
|
54 |
htmlTableau.setHTML(ligne, 4, DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT).format(determination.getDate()));
|
- |
|
55 |
htmlTableau.setWidget(ligne, 5, arbreCommentaires);
|
- |
|
56 |
}
|
- |
|
57 |
|
- |
|
58 |
public void ajouterLigne(Commentaire commentaire, IsWidget arbreCommentaires) {
|
59 |
int ligne = htmlTableau.getRowCount() + 1;
|
59 |
|
60 |
htmlTableau.setWidget(ligne, 1, barreRepartition);
|
60 |
int ligne = htmlTableau.getRowCount() + 1;
|
61 |
htmlTableau.setHTML(ligne, 2, determination.getContributeur());
|
61 |
htmlTableau.setHTML(ligne, 2, commentaire.getAuteur());
|
62 |
htmlTableau.setHTML(ligne, 3, DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT).format(determination.getDate()));
|
62 |
htmlTableau.setHTML(ligne, 4, DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT).format(commentaire.getDate()));
|
63 |
htmlTableau.setWidget(ligne, 4, arbreCommentaires);
|
63 |
htmlTableau.setWidget(ligne, 5, arbreCommentaires);
|
64 |
}
|
64 |
}
|
65 |
|
65 |
|
66 |
@Override
|
66 |
@Override
|