| Line | |
|---|
| 1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
|---|
| 2 | package org.openstreetmap.josm.actions;
|
|---|
| 3 |
|
|---|
| 4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
|---|
| 5 | import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
|
|---|
| 6 |
|
|---|
| 7 | import java.awt.event.KeyEvent;
|
|---|
| 8 | import java.io.File;
|
|---|
| 9 |
|
|---|
| 10 | import org.openstreetmap.josm.gui.layer.Layer;
|
|---|
| 11 | import org.openstreetmap.josm.tools.Shortcut;
|
|---|
| 12 |
|
|---|
| 13 | /**
|
|---|
| 14 | * Export the data.
|
|---|
| 15 | *
|
|---|
| 16 | * @author imi
|
|---|
| 17 | */
|
|---|
| 18 | public class SaveAsAction extends SaveActionBase {
|
|---|
| 19 |
|
|---|
| 20 | /**
|
|---|
| 21 | * Construct the action with "Save" as label.
|
|---|
| 22 | * @param layer Save this layer.
|
|---|
| 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...")), KeyEvent.VK_S, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT));
|
|---|
| 27 | putValue("help", ht("/Action/SaveAs"));
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | @Override protected File getFile(Layer layer) {
|
|---|
| 31 | return openFileDialog(layer);
|
|---|
| 32 | }
|
|---|
| 33 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.