/src/org/tela_botanica/del/client/vues/plateformedetermination/vote/barrerepartition/barreRepartitionVote.css |
---|
New file |
0,0 → 1,0 |
.conteneur {padding:10px 15px 10px 15px; border:solid 1px #ddd; margin-bottom:1px} |
/src/org/tela_botanica/del/client/vues/plateformedetermination/vote/barrerepartition/BarreRepartitionVoteVue.ui.xml |
---|
2,5 → 2,6 |
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" |
xmlns:g="urn:import:com.google.gwt.user.client.ui"> |
<ui:with field="constants" type="org.tela_botanica.del.client.i18n.Vocabulary" /> |
<g:HTML ui:field="barreRepartitionHtmlBrut" /> |
<ui:style src="barreRepartitionVote.css" /> |
<g:HTML ui:field="barreRepartitionHtmlBrut" styleName="{style.conteneur}" /> |
</ui:UiBinder> |
/src/org/tela_botanica/del/client/vues/plateformedetermination/vote/barrerepartition/BarreRepartitionVotePresenteur.java |
---|
1,5 → 1,6 |
package org.tela_botanica.del.client.vues.plateformedetermination.vote.barrerepartition; |
import java.util.ArrayList; |
import java.util.List; |
import org.tela_botanica.del.client.cache.CacheClient; |
23,7 → 24,8 |
} |
private void afficherVotes() { |
vue.afficherVotes(70); |
String nomTaxon = "Acer monsp. L."; |
vue.afficherVotes(70, nomTaxon); |
} |
public BarreRepartitionVoteVue getBarreRepartitionVoteVue() { |
/src/org/tela_botanica/del/client/vues/plateformedetermination/vote/barrerepartition/BarreRepartitionVoteVue.java |
---|
5,6 → 5,7 |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.uibinder.client.UiBinder; |
import com.google.gwt.uibinder.client.UiField; |
import com.google.gwt.user.client.Window; |
import com.google.gwt.user.client.ui.Composite; |
import com.google.gwt.user.client.ui.HTML; |
import com.google.gwt.user.client.ui.Widget; |
17,20 → 18,26 |
private int pourcentage = 0; |
private String NomTaxon = ""; |
@UiField(provided = true) |
public HTML barreRepartitionHtmlBrut = new HTML("<div class=\"barreRepartition\"></div>"); |
public BarreRepartitionVoteVue() { |
afficherVotes(70); |
initWidget(uiBinder.createAndBindUi(this)); |
} |
public void afficherVotes(int pourcentage) { |
public void afficherVotes(int pourcentage, String NomTaxon) { |
this.pourcentage = pourcentage; |
String chaineHtml = "<div class=\"barreRepartition\">"+ |
this.NomTaxon = NomTaxon; |
String chaineHtml = "<div class=\"conteneurBarreRepartition\">" + |
"<div class=\"barreRepartition\">"+ |
"<div style=\"width:"+pourcentage+"%\" class=\"elementBarreRepartition voteOui\"></div>"+ |
"</div>"+ |
"<span class=\"nomTaxonBarreRepartition\">"+NomTaxon+"</span>"+ |
"</div>"; |
barreRepartitionHtmlBrut = new HTML(chaineHtml); |
barreRepartitionHtmlBrut.setHTML(chaineHtml); |
} |
} |