Subversion Repositories eFlore/Applications.del

Rev

Rev 144 | Rev 186 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 172
Line 14... Line 14...
14
	
14
	
Line 15... Line 15...
15
	interface MyUiBinder extends UiBinder<Widget, BarreRepartitionVoteVue> {}
15
	interface MyUiBinder extends UiBinder<Widget, BarreRepartitionVoteVue> {}
Line 16... Line 16...
16
 
16
 
-
 
17
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
-
 
18
	
Line 17... Line 19...
17
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
19
	private int pourcentage = -1;
Line 18... Line 20...
18
	
20
	
19
	private int pourcentage = 0;
21
	private int tailleBarre = 0;
Line 29... Line 31...
29
	
31
	
Line 30... Line 32...
30
	public void afficherVotes(int pourcentage, String NomTaxon) {
32
	public void afficherVotes(int pourcentage, String NomTaxon) {
31
		
33
		
-
 
34
		this.pourcentage = pourcentage;
-
 
35
		this.NomTaxon = NomTaxon;
-
 
36
		
-
 
37
		tailleBarre = (pourcentage > -1) ? pourcentage : 0;
-
 
38
		
-
 
39
		String classe = "barreRepartition";
-
 
40
		if(pourcentage == -1) {
-
 
41
			classe = "barreRepartitionAucunVote";
32
		this.pourcentage = pourcentage;
42
		}
33
		this.NomTaxon = NomTaxon;
43
		
34
		String chaineHtml = "<div class=\"conteneurBarreRepartition\">" +
44
		String chaineHtml = "<div class=\"conteneurBarreRepartition\">" +
35
							"<div class=\"barreRepartition\">"+
45
							"<div class=\""+classe+"\">"+
36
							"<div style=\"width:"+pourcentage+"%\" class=\"elementBarreRepartition voteOui\"></div>"+
46
							"<div style=\"width:"+tailleBarre+"%\" class=\"elementBarreRepartition voteOui\"></div>"+
37
							"</div>"+
47
							"</div>"+
38
							"<span class=\"nomTaxonBarreRepartition\">"+NomTaxon+"</span>"+
48
							"<span class=\"nomTaxonBarreRepartition\">"+NomTaxon+"</span>"+
39
							"</div>";
49
							"</div>";
-
 
50
		barreRepartitionHtmlBrut.setHTML(chaineHtml);	
-
 
51
	}
-
 
52
	
-
 
53
	public HTML getBarreRepartitionHtmlBrut() {
Line 40... Line 54...
40
		barreRepartitionHtmlBrut.setHTML(chaineHtml);	
54
		return barreRepartitionHtmlBrut;