39,7 → 39,7 |
Panel votePrisEnCompte, voteModifie, voteSupprime, zoneFleur; |
|
@UiField |
Label nbVotes, protocole, noteGenerale; |
Label nbVotes, protocole, noteGenerale, nbPoints; |
|
@UiField |
Button boutonAnnuler; |
67,6 → 67,10 |
return nbVotes; |
} |
|
public HasText getNbPoints() { |
return nbPoints; |
} |
|
public HasClickHandlers getVotes() { |
return votes; |
} |
83,25 → 87,38 |
boutonAnnuler.setVisible(false); |
} |
|
public void afficherNbVotes () { |
public void afficherNbVotes() { |
nbVotes.setVisible(true); |
} |
|
public void masquerNbVotes () { |
public void masquerNbVotes() { |
nbVotes.setVisible(false); |
} |
|
public void afficherNbPoints() { |
nbPoints.setVisible(true); |
} |
|
public void masquerNbPoints() { |
nbPoints.setVisible(false); |
} |
|
public void reinitialiserVotes() { |
votes.setValue(valeurOrigine); |
} |
|
public void rafraichir(int voteUtilisateur, int nombreVotes) { |
public void rafraichir(int voteUtilisateur, int nombreVotes, int nombrePoints) { |
valeurOrigine = voteUtilisateur; |
String valeurVote = nombreVotes+" "+I18n.getVocabulary().nbVotes(); |
if (nombreVotes > 1) { |
valeurVote += "s"; |
} |
String valeurPoints = ", "+Math.max(0, nombrePoints)+" "+I18n.getVocabulary().nbPoints(); |
if (nombrePoints > 1) { |
valeurPoints += "s"; |
} |
nbVotes.setText(valeurVote); |
nbPoints.setText(valeurPoints); |
votes.setValue(voteUtilisateur); |
} |
|