Last change
on this file since 6380 was 6380, checked in by Don-vip, 11 years ago |
update license/copyright information
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Rev | Line | |
---|
[6380] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
[444] | 2 | package org.openstreetmap.josm.actions;
|
---|
| 3 |
|
---|
| 4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
[2323] | 5 | import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
|
---|
[444] | 6 |
|
---|
| 7 | import java.awt.event.KeyEvent;
|
---|
| 8 | import java.io.File;
|
---|
| 9 |
|
---|
| 10 | import org.openstreetmap.josm.gui.layer.Layer;
|
---|
[1084] | 11 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
[444] | 12 |
|
---|
| 13 | /**
|
---|
| 14 | * Export the data.
|
---|
[1023] | 15 | *
|
---|
[444] | 16 | * @author imi
|
---|
| 17 | */
|
---|
| 18 | public class SaveAsAction extends SaveActionBase {
|
---|
[5048] | 19 | private static SaveAsAction instance = new SaveAsAction();
|
---|
[6069] | 20 |
|
---|
[1169] | 21 | /**
|
---|
| 22 | * Construct the action with "Save" as label.
|
---|
| 23 | */
|
---|
[1808] | 24 | public SaveAsAction() {
|
---|
[1218] | 25 | super(tr("Save As..."), "save_as", tr("Save the current data to a new file."),
|
---|
[4958] | 26 | Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save As...")),
|
---|
[4982] | 27 | KeyEvent.VK_S, Shortcut.CTRL_SHIFT));
|
---|
[2323] | 28 | putValue("help", ht("/Action/SaveAs"));
|
---|
[1169] | 29 | }
|
---|
[6069] | 30 |
|
---|
[5048] | 31 | public static SaveAsAction getInstance() {
|
---|
| 32 | return instance;
|
---|
| 33 | }
|
---|
[1023] | 34 |
|
---|
[1169] | 35 | @Override protected File getFile(Layer layer) {
|
---|
[5459] | 36 | return layer.createAndOpenSaveFileChooser();
|
---|
[1169] | 37 | }
|
---|
[444] | 38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.