import java.awt.*; /* * TF_Maker.java * * Created on May 20, 2002, 3:39 PM */ /** * * @author levenick * @version */ public class TF_Maker extends AbstractMaker { public String getName() { return "TextFields"; } public String createDeclSource(Object o) { TextField aTF = (TextField) o; String theTFName = aTF.getText(); returnMe = ""; emit(1, "TextField " + theTFName + " = new TextField(\"" + theTFName + "\");\n"); return returnMe; } public String createSource(Object o) { TextField aTF = (TextField) o; String theTFName = aTF.getText(); Rectangle r = aTF.getBounds(); emitCreateComponent(r, "TextField", theTFName); emitActionListener(theTFName, "theTA.append(\"Text= --->\" + " + theTFName + ".getText() + \"<---\\n\");"); emitAddComponent(theTFName); return returnMe; } }