Subversion Repositories eFlore/Applications.del

Rev

Rev 926 | Rev 965 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 926 Rev 939
Line 13... Line 13...
13
import com.google.gwt.user.client.ui.FlexTable;
13
import com.google.gwt.user.client.ui.FlexTable;
14
import com.google.gwt.user.client.ui.HTMLPanel;
14
import com.google.gwt.user.client.ui.HTMLPanel;
15
import com.google.gwt.user.client.ui.Panel;
15
import com.google.gwt.user.client.ui.Panel;
16
import com.google.gwt.user.client.ui.Widget;
16
import com.google.gwt.user.client.ui.Widget;
Line -... Line 17...
-
 
17
 
-
 
18
/**
-
 
19
 * Cette classe permet d'afficher une popup avec la liste des commentaires
-
 
20
 * associées à une proposition de determination
-
 
21
 * 
-
 
22
 * @author LIENS
-
 
23
 * 
17
 
24
 */
Line 18... Line 25...
18
public class DetailCommentaireVue extends Composite implements DetailCommentairePresenteur.Vue {
25
public class DetailCommentaireVue extends Composite implements DetailCommentairePresenteur.Vue {
Line 19... Line 26...
19
 
26
 
Line 33... Line 40...
33
 
40
 
34
	public DetailCommentaireVue() {
41
	public DetailCommentaireVue() {
35
		initWidget(uiBinder.createAndBindUi(this));
42
		initWidget(uiBinder.createAndBindUi(this));
Line -... Line 43...
-
 
43
	}
-
 
44
 
-
 
45
	/**
36
	}
46
	 * Affiche les commentaires associées à une proposition de determination
37
 
47
	 */
Line 38... Line 48...
38
	@Override
48
	@Override
39
	public void afficherCommentairesProposition(PropositionDetermination propositionDetermination) {
49
	public void afficherCommentairesProposition(PropositionDetermination propositionDetermination) {
Line 48... Line 58...
48
		}
58
		}
Line 49... Line 59...
49
 
59
 
50
		creerListeCommentaireRecursive(propositionDetermination.getListeCommentaires());
60
		creerListeCommentaireRecursive(propositionDetermination.getListeCommentaires());
Line -... Line 61...
-
 
61
	}
-
 
62
 
-
 
63
	/**
-
 
64
	 * Affiche une liste de commentaires recursivement
51
	}
65
	 * @param commentaires
Line 52... Line 66...
52
 
66
	 */
53
	private void creerListeCommentaireRecursive(List<Commentaire> commentaires) {
67
	private void creerListeCommentaireRecursive(List<Commentaire> commentaires) {
54
 
68
 
55
		for (Commentaire commentaire : commentaires) {
69
		for (Commentaire commentaire : commentaires) {
56
			chargerCommentaire(commentaire);
70
			chargerCommentaire(commentaire);
57
			if (commentaire.getListeCommentaires().size() > 0) {
71
			if (commentaire.getListeCommentaires().size() > 0) {
58
				creerListeCommentaireRecursive(commentaire.getListeCommentaires());
72
				creerListeCommentaireRecursive(commentaire.getListeCommentaires());
Line -... Line 73...
-
 
73
			}
-
 
74
		}
-
 
75
	}
-
 
76
 
59
			}
77
	/**
60
		}
78
	 * Affiche un commentaire
61
	}
79
	 * @param commentaire
62
 
80
	 */
63
	private void chargerCommentaire(Commentaire commentaire) {
81
	private void chargerCommentaire(Commentaire commentaire) {
64
		int ligne = htmlTableau.getRowCount() + 1;
82
		int ligne = htmlTableau.getRowCount() + 1;
Line -... Line 83...
-
 
83
		htmlTableau.setHTML(ligne, 1, commentaire.getAuteur());
-
 
84
		htmlTableau.setHTML(ligne, 2, commentaire.getCommentaire());
-
 
85
		htmlTableau.setHTML(ligne, 3, commentaire.getDate() + "");
65
		htmlTableau.setHTML(ligne, 1, commentaire.getAuteur());
86
	}
66
		htmlTableau.setHTML(ligne, 2, commentaire.getCommentaire());
87
 
67
		htmlTableau.setHTML(ligne, 3, commentaire.getDate() + "");
88
	/**
68
	}
89
	 * Affiche les en-têtes du tableau de commentaires
69
 
90
	 */
Line -... Line 91...
-
 
91
	private void creerEntetes() {
-
 
92
		htmlTableau.setHTML(1, 1, I18n.getVocabulary().contributeur());
-
 
93
		htmlTableau.setHTML(1, 2, I18n.getVocabulary().commentaire());
70
	private void creerEntetes() {
94
		htmlTableau.setHTML(1, 3, I18n.getVocabulary().date());
71
		htmlTableau.setHTML(1, 1, I18n.getVocabulary().contributeur());
95
	}
72
		htmlTableau.setHTML(1, 2, I18n.getVocabulary().commentaire());
96
 
73
		htmlTableau.setHTML(1, 3, I18n.getVocabulary().date());
97
	/**
74
	}
98
	 * Affiche un icone de début de chargement
75
 
99
	 */
Line -... Line 100...
-
 
100
	@Override
-
 
101
	public void startChargement() {
-
 
102
		panneauChargement.setHeight((this.getOffsetHeight() / 2) + "px");
76
	@Override
103
		panneauChargement.setWidth((this.getOffsetWidth() / 2) + "px");
77
	public void startChargement() {
104
		panneauChargement.setVisible(true);
78
		panneauChargement.setHeight((this.getOffsetHeight() / 2) + "px");
105
	}
79
		panneauChargement.setWidth((this.getOffsetWidth() / 2) + "px");
106
 
80
		panneauChargement.setVisible(true);
107
	/**
-
 
108
	 * Cache l'icone de début de chargement
-
 
109
	 */
-
 
110
	@Override
81
	}
111
	public void stopChargement() {
82
 
112
		panneauChargement.setVisible(false);
83
	@Override
113
	}
84
	public void stopChargement() {
114