1 56 package org.objectstyle.cayenne.modeler.dialog.datamap; 57 58 import org.objectstyle.cayenne.map.DataMap; 59 import org.objectstyle.cayenne.modeler.ProjectController; 60 import org.scopemvc.controller.basic.BasicController; 61 import org.scopemvc.core.Control; 62 import org.scopemvc.core.ControlException; 63 64 69 public abstract class DefaultsPreferencesController extends BasicController { 70 71 public static final String CANCEL_CONTROL = "cayenne.modeler.datamap.defaultprefs.cancel.button"; 72 public static final String UPDATE_CONTROL = "cayenne.modeler.datamap.defaultprefs.update.button"; 73 74 protected DataMap dataMap; 75 protected ProjectController mediator; 76 77 public DefaultsPreferencesController(ProjectController mediator, DataMap dataMap) { 78 setModel(new DefaultsPreferencesModel(true)); 79 this.dataMap = dataMap; 80 this.mediator = mediator; 81 } 82 83 protected void doHandleControl(Control control) throws ControlException { 84 if (control.matchesID(CANCEL_CONTROL)) { 85 shutdown(); 86 } 87 } 88 } | Popular Tags |