Subversion Repositories eFlore/Applications.del

Rev

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

Rev 210 Rev 228
Line 3... Line 3...
3
import org.tela_botanica.del.client.i18n.I18n;
3
import org.tela_botanica.del.client.i18n.I18n;
Line 4... Line 4...
4
 
4
 
5
import com.google.gwt.user.client.ui.HTML;
5
import com.google.gwt.user.client.ui.HTML;
Line 6... Line 6...
6
import com.google.gwt.user.client.ui.TextBox;
6
import com.google.gwt.user.client.ui.TextBox;
Line -... Line 7...
-
 
7
 
-
 
8
public class ValidateurChampNCaracteres extends ValidateurChampTexteAbstrait {
7
 
9
 
8
public class FourCharactersFormValidator extends AbstractTextFieldValidator {
10
	private int nbCaracteres = 0;
9
 
11
	
10
	public FourCharactersFormValidator(TextBox textBox) {
12
	public ValidateurChampNCaracteres(TextBox textBox) {
-
 
13
		super(textBox);
-
 
14
		// TODO Auto-generated constructor stub
-
 
15
	}
-
 
16
	
Line 11... Line 17...
11
		super(textBox);
17
	public void setNbCaracteres(int nbCaracteresMax) {
12
		// TODO Auto-generated constructor stub
18
		nbCaracteres = nbCaracteresMax;
13
	}
19
	}
14
 
20
 
15
	@Override
21
	@Override
16
	public boolean validate() {
22
	public boolean valider() {
17
		if(getTextBox().getText().length()>=4){
23
		if(getTextBox().getText().length()>=nbCaracteres){
18
			getTextBox().removeStyleName(getStyleErreur());
24
			getTextBox().removeStyleName(getStyleErreur());