1 4 package org.oddjob.designer.model; 5 6 import java.util.Observable ; 7 8 9 15 abstract public class TextInput extends Observable 16 implements DesignDefinition, FormDefinition { 17 18 private final String heading; 19 20 public TextInput(String heading) { 21 this.heading = heading; 22 } 23 24 public String getTitle() { 25 return heading; 26 } 27 28 abstract public void setText(String text); 29 30 abstract public String getText(); 31 32 35 public void accept(DesignProcessor processor) { 36 processor.onTextInput(this); 37 } 38 39 42 public boolean isPopulated() { 43 return getText() != null && getText().length() > 0; 44 } 45 } 46 | Popular Tags |