1 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 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 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 42 public MapDE getProperty() { 43 return property; 44 } 45 46 49 public void setProperty(MapDE property) { 50 property.supportedTypes(new String [] { "value" }); 51 this.property = property; 52 } 53 54 public void setDatabase(MapDE database) { 55 database.supportedTypes(new String [] { "value" }); 56 this.database = database; 57 } 58 59 public MapDE getDatabase() { 60 return database; 61 } 62 } 63 | Popular Tags |