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();
}