KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > designer > elements > EnvironmentDE


1 /*
2  * (c) Rob Gordon 2005.
3  */

4 package org.oddjob.designer.elements;
5
6 import org.oddjob.designer.elements.simple.SimpleTextAttribute;
7 import org.oddjob.designer.model.DesignDefinition;
8 import org.oddjob.designer.model.DesignElementType;
9 import org.oddjob.designer.model.ElementField;
10 import org.oddjob.designer.model.FieldGroup;
11
12 /**
13  *
14  */

15 public class EnvironmentDE extends DesignElementType {
16
17     private SimpleTextAttribute command;
18     
19     public EnvironmentDE() {
20         setCommand(new SimpleTextAttribute());
21     }
22     
23     public DesignDefinition detail() {
24         return new FieldGroup("Environement")
25             .add(new ElementField("Command", command))
26             .add(new ElementField("Name", getName()));
27     }
28
29     public void setCommand(SimpleTextAttribute command) {
30         command.addObserver(detailObserver);
31         this.command = command;
32     }
33     
34     public SimpleTextAttribute getCommand() {
35         return command;
36     }
37         
38     public void clear() {
39         command.clear();
40         super.clear();
41     }
42 }
43
Popular Tags