本文整理汇总了Java中com.jfoenix.validation.base.ValidatorBase.setSrcControl方法的典型用法代码示例。如果您正苦于以下问题:Java ValidatorBase.setSrcControl方法的具体用法?Java ValidatorBase.setSrcControl怎么用?Java ValidatorBase.setSrcControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jfoenix.validation.base.ValidatorBase
的用法示例。
在下文中一共展示了ValidatorBase.setSrcControl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import com.jfoenix.validation.base.ValidatorBase; //导入方法依赖的package包/类
/**
* validates the text value using the list of validators provided by the
* user {{@link #setValidators(ValidatorBase...)}
*
* @return true if the value is valid else false
*/
public static boolean validate(Control control) {
ValidationFacade facade = (ValidationFacade) control.getParent();
for (ValidatorBase validator : facade.validators) {
if (validator.getSrcControl() == null) {
validator.setSrcControl(facade.controlProperty.get());
}
validator.validate();
if (validator.getHasErrors()) {
facade.activeValidator.set(validator);
control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, true);
return false;
}
}
control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, false);
facade.activeValidator.set(null);
return true;
}
示例2: validate
import com.jfoenix.validation.base.ValidatorBase; //导入方法依赖的package包/类
/**
* validates the text value using the list of validators provided by the user
* {{@link #setValidators(ValidatorBase...)}
*
* @return true if the value is valid else false
*/
@Override
public boolean validate() {
for (ValidatorBase validator : validators) {
if (validator.getSrcControl() == null) {
validator.setSrcControl(this);
}
validator.validate();
if (validator.getHasErrors()) {
activeValidator.set(validator);
return false;
}
}
activeValidator.set(null);
return true;
}
示例3: validate
import com.jfoenix.validation.base.ValidatorBase; //导入方法依赖的package包/类
/**
* validates the password value using the list of validators provided by the user
* {{@link #setValidators(ValidatorBase...)}
*
* @return true if the value is valid else false
*/
@Override
public boolean validate() {
for (ValidatorBase validator : validators) {
if (validator.getSrcControl() == null) {
validator.setSrcControl(this);
}
validator.validate();
if (validator.getHasErrors()) {
activeValidator.set(validator);
return false;
}
}
activeValidator.set(null);
return true;
}
示例4: validate
import com.jfoenix.validation.base.ValidatorBase; //导入方法依赖的package包/类
/**
* validates the text value using the list of validators provided by the user
* {{@link #setValidators(ValidatorBase...)}
*
* @return true if the value is valid else false
*/
public boolean validate() {
for (ValidatorBase validator : validators) {
if (validator.getSrcControl() == null) {
validator.setSrcControl(this);
}
validator.validate();
if (validator.getHasErrors()) {
activeValidator.set(validator);
return false;
}
}
activeValidator.set(null);
return true;
}