KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

15 public class HsqldbDC extends BaseDC {
16
17     private MapDE database;
18     private MapDE property;
19
20     public HsqldbDC() {
21         setDatabase(new MapDE());
22         setProperty(new MapDE());
23     }
24     
25     /* (non-Javadoc)
26      * @see org.oddjob.designer.model.DesignerComponent#getJPanel()
27      */

28     public FormDefinition form() {
29         return new StandardForm(tag())
30             .addGroup(basePanel())
31             .addGroup(new FieldGroup("Configuration")
32                 .add(new MultiTypeTable("Databases", database)
33                         .setNamed(true).setVisibleRows(3))
34                 .add(new MultiTypeTable("Server Properties", property)
35                     .setNamed(true).setVisibleRows(3))
36             );
37     }
38         
39     /**
40      * @return Returns the property.
41      */

42     public MapDE getProperty() {
43         return property;
44     }
45     
46     /**
47      * @param property The property to set.
48      */

49     public void setProperty(MapDE property) {
50         property.supportedTypes(new String JavaDoc[] { "value" });
51         this.property = property;
52     }
53
54     public void setDatabase(MapDE database) {
55         database.supportedTypes(new String JavaDoc[] { "value" });
56         this.database = database;
57     }
58     
59     public MapDE getDatabase() {
60         return database;
61     }
62 }
63
Popular Tags