1 4 package org.oddjob.designer.components; 5 6 import org.oddjob.designer.elements.InputDE; 7 import org.oddjob.designer.elements.MapDE; 8 import org.oddjob.designer.elements.MultiLineTextDE; 9 import org.oddjob.designer.elements.SimpleDE; 10 import org.oddjob.designer.elements.simple.SimpleTextAttribute; 11 import org.oddjob.designer.model.ElementField; 12 import org.oddjob.designer.model.FieldGroup; 13 import org.oddjob.designer.model.FieldSelection; 14 import org.oddjob.designer.model.FileSelection; 15 import org.oddjob.designer.model.FormDefinition; 16 import org.oddjob.designer.model.MultiTypeTable; 17 import org.oddjob.designer.model.StandardForm; 18 19 22 public class ScriptDC extends BaseDC { 23 24 private SimpleTextAttribute language = new SimpleTextAttribute(); 25 private MultiLineTextDE text = new MultiLineTextDE(); 26 private InputDE input = new InputDE(); 27 private SimpleDE file = new SimpleDE(); 28 private MapDE beans = new MapDE(); 29 30 34 public FormDefinition form() { 35 return new StandardForm(tag()) 36 .addGroup(basePanel()) 37 .addGroup(new FieldGroup("Command Details") 38 .add(new ElementField("Language", language)) 39 .add(new FieldSelection() 40 .add(new ElementField("Text", text)) 41 .add(new FileSelection("File", file)) 42 .add(new ElementField("Input", input))) 43 .add(new MultiTypeTable("Beans", beans).setNamed(true))); 44 } 45 46 49 public MapDE getBeans() { 50 return beans; 51 } 52 53 56 public void setBeans(MapDE environement) { 57 this.beans = environement; 58 } 59 60 public void setLanguage(SimpleTextAttribute language) { 61 this.language = language; 62 } 63 64 public SimpleTextAttribute getLanguage() { 65 return language; 66 } 67 68 69 public SimpleDE getFile() { 70 return file; 71 } 72 public void setFile(SimpleDE file) { 73 this.file = file; 74 } 75 public InputDE getInput() { 76 return input; 77 } 78 public void setInput(InputDE input) { 79 this.input = input; 80 } 81 public MultiLineTextDE getText() { 82 return text; 83 } 84 public void setText(MultiLineTextDE text) { 85 this.text = text; 86 } 87 } 88 | Popular Tags |