KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > designer > components > SqlDC


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

4 package org.oddjob.designer.components;
5
6 import org.oddjob.designer.elements.ConnectionDE;
7 import org.oddjob.designer.elements.MultiLineTextDE;
8 import org.oddjob.designer.model.ElementField;
9 import org.oddjob.designer.model.FieldGroup;
10 import org.oddjob.designer.model.FormDefinition;
11 import org.oddjob.designer.model.StandardForm;
12
13 /**
14  *
15  */

16 public class SqlDC extends BaseDC {
17
18     private ConnectionDE connection = new ConnectionDE();
19     private MultiLineTextDE sql = new MultiLineTextDE();
20     
21     
22     public FormDefinition form() {
23         return new StandardForm(tag())
24             .addGroup(basePanel())
25             .addGroup(new FieldGroup("Configuration")
26                     .add(new ElementField("Connection", connection))
27                     .add(new ElementField("Sql", sql))
28                 );
29     }
30             
31     /**
32      * @return Returns the loadOnly.
33      */

34     public ConnectionDE getConnection() {
35         return connection;
36     }
37     
38     /**
39      * @param loadOnly The loadOnly to set.
40      */

41     public void setConnection(ConnectionDE loadOnly) {
42         this.connection = loadOnly;
43     }
44     
45     public MultiLineTextDE getSql() {
46         return sql;
47     }
48     
49     public void setSql(MultiLineTextDE sql) {
50         this.sql = sql;
51     }
52     
53 }
54
Popular Tags