|
Last change
on this file since 1808 was 1808, checked in by Gubaer, 16 years ago |
|
improved enabling/disabling of menu entries and action buttons depending on current state of JOSM (number of open layers, type of active layer, etc.)
|
-
Property svn:eol-style
set to
native
|
|
File size:
881 bytes
|
| 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 |
|
|---|
| 6 | import java.awt.event.KeyEvent;
|
|---|
| 7 | import java.io.File;
|
|---|
| 8 |
|
|---|
| 9 | import org.openstreetmap.josm.gui.layer.Layer;
|
|---|
| 10 | import org.openstreetmap.josm.tools.Shortcut;
|
|---|
| 11 |
|
|---|
| 12 | /**
|
|---|
| 13 | * Export the data.
|
|---|
| 14 | *
|
|---|
| 15 | * @author imi
|
|---|
| 16 | */
|
|---|
| 17 | public class SaveAsAction extends SaveActionBase {
|
|---|
| 18 |
|
|---|
| 19 | /**
|
|---|
| 20 | * Construct the action with "Save" as label.
|
|---|
| 21 | * @param layer Save this layer.
|
|---|
| 22 | */
|
|---|
| 23 | public SaveAsAction() {
|
|---|
| 24 | super(tr("Save As..."), "save_as", tr("Save the current data to a new file."),
|
|---|
| 25 | Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save As...")), KeyEvent.VK_S, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT));
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | @Override protected File getFile(Layer layer) {
|
|---|
| 29 | return openFileDialog(layer);
|
|---|
| 30 | }
|
|---|
| 31 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.