Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1123 → Rev 1124

/trunk/src/org/tela_botanica/del/client/composants/votes/barrerepartition/BarreRepartitionVoteVue.java
7,6 → 7,7
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.PushButton;
22,9 → 23,9
private InfoBulleAnim animerVoteModifie;
 
@UiField
Label nomTaxon, pourcentage;
Label nomTaxon, score;
@UiField
Panel barreOui, barreNon, votePrisEnCompte, voteModifie;
Panel votePrisEnCompte, voteModifie;
@UiField
PushButton boutonOui, boutonNon;
 
42,20 → 43,12
public void afficherVotes(int pourcentage, String nomTaxon, String auteur, boolean estPropositionInitiale) {
this.nomTaxon.setText(nomTaxon);
this.nomTaxon.setTitle(nomTaxon + " - " + auteur);
if (pourcentage > 0) {
score.setText(String.valueOf(pourcentage));
}
if (estPropositionInitiale) {
this.nomTaxon.addStyleName("propositionInitiale");
}
 
if (pourcentage > -1) {
 
int pourcentageNon = 100 - pourcentage;
barreOui.setWidth(pourcentage + "%");
barreNon.setWidth(pourcentageNon + "%");
} else {
barreNon.setWidth("0px");
barreOui.setWidth("0px");
}
}
 
@Override
129,7 → 122,7
}
@Override
public void setPourcentage(int pourcentage) {
this.pourcentage.setText(String.valueOf(pourcentage) + "%");
public HasText getScore() {
return score;
}
}