コード例 #1
0
 /** Handle being deleted by cleaning up validators and so forth. */
 public void handleDelete() {
   for (Property prop : properties.values()) {
     if (prop.getValidators() != null) {
       for (String validatorName : prop.getValidators()) {
         Validator validator = getRobotTree().getValidator(validatorName);
         if (validator != null) {
           validator.delete(this, prop.getName());
         }
       }
     }
   }
 }
コード例 #2
0
 public String getErrorMessage() {
   String message = "";
   for (String propertyName : getPropertyKeys()) {
     final Property property = getProperty(propertyName);
     if (!property.isValid()) {
       message += property.getName() + ": " + property.getErrorMessage() + "\n";
     }
   }
   if (children != null) {
     for (Object comp : children) {
       String m = ((RobotComponent) comp).getErrorMessage();
       if (m != null && !m.equals("")) {
         message += "" + ((RobotComponent) comp).getFullName() + ":\n" + m;
       }
     }
   }
   return message;
 }