Subversion Repositories eFlore/Applications.del

Rev

Rev 140 | Rev 172 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
140 aurelien 1
package org.tela_botanica.del.client.vues.plateformedetermination.vote.barrerepartition;
2
 
3
import org.tela_botanica.del.client.vues.plateformedetermination.vote.EnsembleVotesVue;
4
 
5
import com.google.gwt.core.client.GWT;
6
import com.google.gwt.uibinder.client.UiBinder;
7
import com.google.gwt.uibinder.client.UiField;
144 aurelien 8
import com.google.gwt.user.client.Window;
140 aurelien 9
import com.google.gwt.user.client.ui.Composite;
10
import com.google.gwt.user.client.ui.HTML;
11
import com.google.gwt.user.client.ui.Widget;
12
 
13
public class BarreRepartitionVoteVue extends Composite {
14
 
15
	interface MyUiBinder extends UiBinder<Widget, BarreRepartitionVoteVue> {}
16
 
17
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
18
 
19
	private int pourcentage = 0;
20
 
144 aurelien 21
	private String NomTaxon = "";
22
 
140 aurelien 23
	@UiField(provided = true)
24
	public HTML barreRepartitionHtmlBrut = new HTML("<div class=\"barreRepartition\"></div>");
25
 
26
	public BarreRepartitionVoteVue() {
27
		initWidget(uiBinder.createAndBindUi(this));
28
	}
29
 
144 aurelien 30
	public void afficherVotes(int pourcentage, String NomTaxon) {
31
 
140 aurelien 32
		this.pourcentage = pourcentage;
144 aurelien 33
		this.NomTaxon = NomTaxon;
34
		String chaineHtml = "<div class=\"conteneurBarreRepartition\">" +
35
							"<div class=\"barreRepartition\">"+
140 aurelien 36
							"<div style=\"width:"+pourcentage+"%\" class=\"elementBarreRepartition voteOui\"></div>"+
144 aurelien 37
							"</div>"+
38
							"<span class=\"nomTaxonBarreRepartition\">"+NomTaxon+"</span>"+
140 aurelien 39
							"</div>";
144 aurelien 40
		barreRepartitionHtmlBrut.setHTML(chaineHtml);
140 aurelien 41
	}
42
 
43
}