Package org.freeplane.core.resources.components.IValidator

Examples of org.freeplane.core.resources.components.IValidator.ValidationResult


    topDialog.getContentPane().add(ButtonBarFactory.buildOKCancelBar(cancelButton, okButton), BorderLayout.SOUTH);
  }

  private boolean validate() {
    final Properties properties = getOptionProperties();
    final ValidationResult result = new ValidationResult();
    for (final IValidator validator : Controller.getCurrentController().getOptionValidators()) {
      result.add(validator.validate(properties));
    }
    if (!result.isValid()) {
      UITools.errorMessage(formatErrors("OptionPanel.validation_error", result.getErrors()));
      LogUtils.severe(result.toString());
    }
    else if (result.hasWarnings()) {
      UITools.informationMessage(formatErrors("OptionPanel.validation_warning", result.getWarnings()));
      LogUtils.warn(result.toString());
    }
    return result.isValid();
  }
View Full Code Here

TOP

Related Classes of org.freeplane.core.resources.components.IValidator.ValidationResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.