1 package gov.nasa.pds.ltdt.gui;
2
3 import gov.nasa.pds.ltdt.gui.configuration.LTDTKeys;
4
5 import java.awt.event.ActionEvent;
6 import java.util.Properties;
7
8 import javax.swing.AbstractAction;
9 import javax.swing.Icon;
10 import javax.swing.JOptionPane;
11
12 public class SaveProjectAction extends AbstractAction {
13
14 private Properties props;
15 private MainWindow window;
16
17 public SaveProjectAction (String name, Icon image,
18 String desc, Integer mnemonic, Properties props, MainWindow window ) {
19
20
21
22 super(name, image);
23 putValue(SHORT_DESCRIPTION,desc);
24 putValue(MNEMONIC_KEY,mnemonic);
25
26 this.props = props;
27 this.window = window;
28
29
30
31 }
32
33 public void actionPerformed(ActionEvent ae) {
34
35
36
37
38
39
40
41
42
43
44
45
46
47 int status = ProjectSave.save(props, window);
48
49 if (status==LTDTKeys.SUCCESS) {
50
51
52
53
54 }
55
56 }
57
58
59 }
60
61
62
63