本文整理汇总了Java中org.jdesktop.beansbinding.Validator.Result方法的典型用法代码示例。如果您正苦于以下问题:Java Validator.Result方法的具体用法?Java Validator.Result怎么用?Java Validator.Result使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.beansbinding.Validator
的用法示例。
在下文中一共展示了Validator.Result方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import org.jdesktop.beansbinding.Validator; //导入方法依赖的package包/类
public Validator.Result validate(Object arg) {
if (((String) arg).length() < MIN_LENGTH) {
return new Validator.Result(null, "Password is too short. Min length is " + String.valueOf(MIN_LENGTH)); // NOI18N
} else {
return null;
}
}
示例2: validate
import org.jdesktop.beansbinding.Validator; //导入方法依赖的package包/类
public Validator.Result validate(Integer arg) {
if ((arg < 1) || (arg > 199)) {
return new Result(null, "Age range is 1-199");
}
return null;
}
示例3: validate
import org.jdesktop.beansbinding.Validator; //导入方法依赖的package包/类
@Override
public Validator.Result validate(Object arg0) {
if (arg0.equals(true)) {
formValidation.setComboBoxState(false);
formValidation.setTextFieldState(true);
}
return null;
}
示例4: validate
import org.jdesktop.beansbinding.Validator; //导入方法依赖的package包/类
@Override
public Validator.Result validate(Object arg0) {
if (arg0.equals(true)) {
formValidation.setComboBoxState(true);
formValidation.setTextFieldState(false);
formValidation.setButtonState(true);
}
return null;
}
示例5: validate
import org.jdesktop.beansbinding.Validator; //导入方法依赖的package包/类
public Validator.Result validate(String arg) {
if ((arg == null) || (arg.length() == 0)) {
return new Validator.Result(null, "Empty value");
}
return null;
}
示例6: validate
import org.jdesktop.beansbinding.Validator; //导入方法依赖的package包/类
public Validator.Result validate(String arg) {
if ((arg.length() < 4) || !arg.contains("@") || !arg.contains(".")) {
return new Result(null, "Please enter a valid email");
}
return null;
}
示例7: validate
import org.jdesktop.beansbinding.Validator; //导入方法依赖的package包/类
@Override
public Validator.Result validate(Object arg0) {
throw new UnsupportedOperationException("Not supported yet.");
}