source: josm/trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java

Last change on this file was 16913, checked in by simon04, 4 years ago

fix #19698 - Refactoring: make private fields final

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
5import static org.openstreetmap.josm.tools.I18n.tr;
6
7import java.awt.event.KeyEvent;
8import java.io.File;
9
10import org.openstreetmap.josm.gui.layer.Layer;
11import org.openstreetmap.josm.tools.Shortcut;
12
13/**
14 * Export the data.
15 *
16 * @author imi
17 */
18public class SaveAsAction extends SaveActionBase {
19 private static final SaveAsAction instance = new SaveAsAction();
20
21 /**
22 * Construct the action with "Save" as label.
23 */
24 public SaveAsAction() {
25 super(tr("Save As..."), "save_as", tr("Save the current data to a new file."),
26 Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save As...")),
27 KeyEvent.VK_S, Shortcut.CTRL_SHIFT), false);
28 setHelpId(ht("/Action/SaveAs"));
29 }
30
31 /**
32 * Returns the unique instance.
33 * @return the unique instance
34 */
35 public static SaveAsAction getInstance() {
36 return instance;
37 }
38
39 @Override protected File getFile(Layer layer) {
40 return layer.createAndOpenSaveFileChooser();
41 }
42}
Note: See TracBrowser for help on using the repository browser.