1 package jimm.datavision.gui; 2 import jimm.datavision.*; 3 import jimm.datavision.gui.cmd.ReportStartupScriptEditCommand; 4 import jimm.util.I18N; 5 6 13 public class StartupScriptEditor extends ScriptEditorWin { 14 15 protected Report report; 16 17 23 public StartupScriptEditor(Designer designer, Report report) { 24 super(designer, report, 25 report.getStartFormula() == null ? "" 26 : report.getStartFormula().getEditableExpression(), 27 I18N.get("StartupScriptEditor.title_prefix"), 28 "StartupScriptEditor.error_unchanged", 29 "StartupScriptEditor.error_title"); 30 this.report = report; 31 32 if (report.getStartFormula() != null) 33 setLanguage(report.getStartFormula().getLanguage()); 34 else 35 setLanguage(report.getScripting().getDefaultLanguage()); 36 37 } 39 40 47 public void save(String text) { 48 command = new ReportStartupScriptEditCommand(report, text, getLanguage()); 49 } 50 51 } 52 | Popular Tags |