Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1123 → Rev 1124

/trunk/src/org/tela_botanica/del/client/composants/votes/barrerepartition/barreRepartition.css
83,4 → 83,10
background-image: url("img/pouce_bas.png");
}
 
 
.score {
font-size:13px;
color:#DDD;
font-weight:bold;
margin-right:10px;
width:28px;
}
/trunk/src/org/tela_botanica/del/client/composants/votes/barrerepartition/BarreRepartitionVoteVue.ui.xml
4,14 → 4,10
<ui:with field="constants" type="org.tela_botanica.del.client.i18n.Vocabulary" />
<ui:style src="barreRepartition.css" />
<g:HTMLPanel styleName="{style.conteneurBarre}">
<g:Label styleName="gauche {style.score}" ui:field="score">--</g:Label>
<g:Label ui:field="nomTaxon" styleName="{style.labelTaxon} labelTaxon" />
<g:HTMLPanel styleName="{style.conteneurBarreOuiNon}">
<g:PushButton ui:field="boutonNon" text=" " styleName="{style.boutonNon}"/>
<g:HTMLPanel styleName="{style.barre}">
<g:Label styleName="{style.pourcentage}" ui:field="pourcentage"></g:Label>
<g:HTMLPanel ui:field="barreOui" styleName="{style.barreOui} gauche"/>
<g:HTMLPanel ui:field="barreNon" styleName="{style.barreNon} droite"/>
</g:HTMLPanel>
<g:PushButton ui:field="boutonOui" text=" " styleName="{style.boutonOui}"/>
<g:HTMLPanel ui:field="votePrisEnCompte"><g:Label text="{constants.votePrisEnCompte}"></g:Label></g:HTMLPanel>
<g:HTMLPanel ui:field="voteModifie"><g:Label text="{constants.voteModifie}"></g:Label></g:HTMLPanel>
/trunk/src/org/tela_botanica/del/client/composants/votes/barrerepartition/BarreRepartitionVotePresenteur.java
16,6 → 16,7
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.IsWidget;
 
32,7 → 33,7
public void afficherVotePrisEnCompte(boolean b);
public void afficherVoteModifie(boolean b);
public void toggleNomEspece();
public void setPourcentage(int pourcentage);
public HasText getScore();
}
 
private Vue vue;
61,9 → 62,6
estPropositionInitiale = moyenneVote.getPropositionAssociee().estPropositionInitiale();
}
vue.afficherVotes(score, intitule, moyenneVote.getPropositionAssociee().getAuteur(), estPropositionInitiale);
if (score > 0) {
vue.setPourcentage(score);
}
afficherValeurVoteUtilisateur();
}
/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;
}
}