本文整理匯總了Java中com.jfoenix.validation.base.ValidatorBase.getSrcControl方法的典型用法代碼示例。如果您正苦於以下問題:Java ValidatorBase.getSrcControl方法的具體用法?Java ValidatorBase.getSrcControl怎麽用?Java ValidatorBase.getSrcControl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.jfoenix.validation.base.ValidatorBase
的用法示例。
在下文中一共展示了ValidatorBase.getSrcControl方法的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;
}