Пример #1
0
 @Override
 public String getHeading() {
   StringBuilder singleLineHeading = new StringBuilder();
   if (isNotBlank(field.getDisplayString())) {
     singleLineHeading
         .append(field.getDisplayString())
         .append("(")
         .append(field.getName())
         .append(")");
   } else {
     singleLineHeading.append(field.getName());
   }
   if (isNotBlank(field.getDescription())) {
     singleLineHeading.append(" [").append(field.getDescription()).append("]");
   }
   this.name = field.getName();
   this.description = field.getDescription();
   this.displayString = field.getDisplayString();
   field.setName(null);
   field.setDescription(null);
   field.setDisplayString(null);
   this.heading = singleLineHeading.toString();
   return singleLineHeading.toString() + ":";
 }
Пример #2
0
 @Override
 public void close() {
   field.setName(this.name);
   field.setDisplayString(this.displayString);
   field.setDescription(this.description);
 }