Subversion Repositories eFlore/Applications.del

Rev

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

package org.tela_botanica.del.client.composants.validation;

import org.tela_botanica.del.client.i18n.I18n;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.TextBox;


public class ValidateurChampDouble extends ValidateurChampTexteAbstrait {

        public ValidateurChampDouble(HasText textBox) {
                super(textBox);
        }

        @Override
        public boolean valider() {
                try {
                        Double.parseDouble(getTextBox().getText());
                        supprimerStyleErreur(getStyleErreur());
                        return true;
                } catch (Exception e) {
                        afficherStyleErreur(getStyleErreur());
                        return false;
                }
        }

}