1 4 package org.oddjob.designer.components; 5 6 import org.oddjob.designer.elements.ListDE; 7 import org.oddjob.designer.elements.MapDE; 8 import org.oddjob.designer.elements.SingleSelectionDE; 9 import org.oddjob.designer.elements.scheduling.ScheduleListDE; 10 import org.oddjob.designer.model.ElementField; 11 import org.oddjob.designer.model.FieldGroup; 12 import org.oddjob.designer.model.FormDefinition; 13 import org.oddjob.designer.model.MultiTypeTable; 14 import org.oddjob.designer.model.SingleTypeSelection; 15 import org.oddjob.designer.model.StandardForm; 16 17 20 public class SchedulerDC extends BaseDC { 21 22 private SingleSelectionDE persister; 23 private MapDE property = new MapDE(); 24 private ScheduleListDE schedules = new ScheduleListDE(); 25 26 public SchedulerDC() { 27 setPersister(new SingleSelectionDE()); 28 } 29 30 33 public FormDefinition form() { 34 return new StandardForm(tag()) 35 .addGroup(basePanel()) 36 .addGroup(new FieldGroup("Confirguration") 37 .add(new ElementField("Persister", persister))) 38 .addGroup( 39 new MultiTypeTable("Property", property) 40 .setNamed(true).setVisibleRows(3)) 41 .addGroup(new MultiTypeTable("Schedules", schedules) 42 .setNamed(false)); 43 } 44 45 public SingleSelectionDE getPersister() { 46 return persister; 47 } 48 49 public void setPersister(SingleSelectionDE persister) { 50 persister.supportedTypes(new String [] { "filePersister", "sqlPersister" }); 51 this.persister = persister; 52 } 53 54 57 public MapDE getProperty() { 58 return property; 59 } 60 63 public void setProperty(MapDE property) { 64 this.property = property; 65 } 66 67 public ScheduleListDE getSchedules() { 68 return schedules; 69 } 70 71 public void setSchedules(ScheduleListDE schedules) { 72 this.schedules = schedules; 73 } 74 75 } 76 | Popular Tags |