01: package org.osbl.domain.gui;
02:
03: import org.osbl.client.wings.form.*;
04: import org.osbl.client.wings.shell.Environment;
05: import org.osbl.client.wings.XButton;
06: import org.osbl.ServiceProvider;
07: import org.osbl.domain.model.Domain;
08: import org.osbl.domain.logic.DomainLogic;
09:
10: public class DomainEditor extends GenericObjectEditor {
11: DomainLogic domainLogic = (DomainLogic) ServiceProvider
12: .getInstance().getService("DomainLogic");
13:
14: protected ObjectForm initializeForm() {
15: return new DomainForm();
16: }
17:
18: protected ObjectList initializeList() {
19: return new DomainList();
20: }
21:
22: public Class getType() {
23: return Domain.class;
24: }
25:
26: public void saveObject(Object object) {
27: domainLogic.updateDomain((Domain) object);
28: }
29:
30: public void deleteObject(Object object) {
31: }
32:
33: public void revertObject(Object object) {
34: }
35:
36: protected void formControls(Environment environment) {
37: environment.addControl(new XButton(listAction));
38: environment.addControl(new XButton(previousAction));
39: environment.addControl(new XButton(nextAction));
40: environment.addControl(new XButton(saveAction));
41: }
42:
43: protected void listControls(Environment environment) {
44: }
45: }
|