Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1101 → Rev 1102

/trunk/src/org/tela_botanica/del/client/composants/commentaires/DetailCommentaireVue.java
7,12 → 7,10
import org.tela_botanica.del.client.modeles.PropositionDetermination;
 
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Panel;
36,12 → 34,9
HTMLPanel titre, auteur, aucuneDonnees;
 
@UiField
Panel panneauChargement;
Panel panneauChargement, ligneCommentaire;
 
@UiField
FlexTable htmlTableau;
 
@UiField
Button boutonAjoutCommentaire;
@Override
65,15 → 60,9
HTML htmlAuteur = new HTML(I18n.getVocabulary().proposePar()+propositionDetermination.getAuteur());
auteur.add(htmlAuteur);
 
htmlTableau.clear();
creerEntetes();
LigneCommentairePresenteur presenteurCommentaire = new LigneCommentairePresenteur(new LigneCommentaireVue(), propositionDetermination);
presenteurCommentaire.go(ligneCommentaire);
 
if (propositionDetermination.getCommentaire() != null && propositionDetermination.getCommentaire() != "") {
htmlTableau.setHTML(2, 1, propositionDetermination.getAuteur());
htmlTableau.setHTML(2, 2, propositionDetermination.getCommentaire());
htmlTableau.setHTML(2, 3, DateTimeFormat.getFormat("dd/MM/yyyy").format(propositionDetermination.getDate()));
}
 
creerListeCommentaireRecursive(propositionDetermination.getListeCommentaires());
}
 
96,22 → 85,11
* @param commentaire
*/
private void chargerCommentaire(Commentaire commentaire) {
int ligne = htmlTableau.getRowCount() + 1;
htmlTableau.setHTML(ligne, 1, commentaire.getAuteur());
htmlTableau.setHTML(ligne, 2, commentaire.getCommentaire());
htmlTableau.setHTML(ligne, 3, DateTimeFormat.getFormat("dd/MM/yyyy").format(commentaire.getDate()));
LigneCommentairePresenteur presenteurCommentaire = new LigneCommentairePresenteur(new LigneCommentaireVue(), commentaire);
presenteurCommentaire.go(ligneCommentaire);
}
 
/**
* Affiche les en-têtes du tableau de commentaires
*/
private void creerEntetes() {
htmlTableau.setHTML(1, 1, I18n.getVocabulary().contributeur());
htmlTableau.setHTML(1, 2, I18n.getVocabulary().commentaire());
htmlTableau.setHTML(1, 3, I18n.getVocabulary().date());
}
 
/**
* Affiche un icone de début de chargement
*/
@Override