01: package jimm.datavision.gui.sql;
02:
03: import jimm.datavision.gui.Designer;
04: import jimm.datavision.gui.CodeEditorWin;
05: import jimm.datavision.Report;
06: import jimm.datavision.gui.cmd.WhereClauseEditCommand;
07: import jimm.util.I18N;
08:
09: /**
10: * This dialog lets the user edit the report query's where clause.
11: *
12: * @author Jim Menard, <a href="mailto:jimm@io.com">jimm@io.com</a>
13: * @see jimm.datavision.source.Query
14: * @see jimm.datavision.gui.cmd.WhereClauseEditCommand
15: */
16: public class WhereClauseWin extends CodeEditorWin {
17:
18: protected Report report;
19:
20: /**
21: * Constructor.
22: *
23: * @param designer the design window to which this dialog belongs
24: * @param report the...um...I forgot
25: */
26: public WhereClauseWin(Designer designer, Report report) {
27: super (designer, report, report.getDataSource().getQuery()
28: .getEditableWhereClause(), I18N
29: .get("WhereClauseWin.title"), null, null);
30: this .report = report;
31: }
32:
33: public void save(String text) {
34: command = new WhereClauseEditCommand(report.getDataSource()
35: .getQuery(), text);
36: }
37:
38: }
|