01: /*
02: * Created on Jun 19, 2004
03: */
04: package net.charabia.jsmoothgen.application.swtgui;
05:
06: import org.eclipse.swt.SWT;
07: import org.eclipse.swt.widgets.FileDialog;
08:
09: public class SaveAsProjectAction extends JSmoothAction {
10: private JSmoothApplication js;
11:
12: public SaveAsProjectAction(JSmoothApplication js) {
13: super (js);
14: }
15:
16: public boolean run() {
17: FileDialog dialog = new FileDialog(getApplication().getShell(),
18: SWT.SAVE);
19: dialog.setText("Save Project");
20: String file = dialog.open();
21: if (file != null) {
22: return getApplication().saveProjectAs(file);
23: } else {
24: return false;
25: }
26: }
27: }
|