Subversion Repositories eFlore/Applications.del

Rev

Rev 144 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.del.client.vues.plateformedetermination.vote.barrerepartition;

import org.tela_botanica.del.client.vues.plateformedetermination.vote.EnsembleVotesVue;

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.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;

public class BarreRepartitionVoteVue extends Composite {
        
        interface MyUiBinder extends UiBinder<Widget, BarreRepartitionVoteVue> {}

        private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
        
        private int pourcentage = 0;
        
        @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) {
                this.pourcentage = pourcentage;
                String chaineHtml = "<div class=\"barreRepartition\">"+
                                                        "<div style=\"width:"+pourcentage+"%\" class=\"elementBarreRepartition voteOui\"></div>"+
                                                        "</div>";
                barreRepartitionHtmlBrut = new HTML(chaineHtml);        
        }

}