01: package jimm.datavision.gui.cmd;
02:
03: import jimm.datavision.Report;
04: import jimm.datavision.Group;
05: import jimm.datavision.gui.Designer;
06: import jimm.util.I18N;
07:
08: public class DeleteGroupCommand extends CommandAdapter {
09:
10: protected Designer designer;
11: protected Report report;
12: protected Group group;
13:
14: /**
15: * Constructor.
16: */
17: public DeleteGroupCommand(Designer designer, Report report,
18: Group group) {
19: super (I18N.get("DeleteGroupCommand.name"));
20:
21: this .designer = designer;
22: this .report = report;
23: this .group = group;
24: }
25:
26: public void perform() {
27: report.removeGroup(group);
28: designer.rebuildGroups();
29: }
30:
31: public void undo() {
32: report.addGroup(group);
33: designer.rebuildGroups();
34: }
35:
36: }
|