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

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
RevLine 
[298]1// License: GPL. Copyright 2007 by Immanuel Scholz and others
[444]2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.event.KeyEvent;
7import java.io.File;
8
9import org.openstreetmap.josm.gui.layer.Layer;
[1084]10import org.openstreetmap.josm.tools.Shortcut;
[444]11
12/**
13 * Export the data.
[1023]14 *
[444]15 * @author imi
16 */
17public class SaveAsAction extends SaveActionBase {
[1023]18
[1169]19 /**
20 * Construct the action with "Save" as label.
21 * @param layer Save this layer.
22 */
[1808]23 public SaveAsAction() {
[1218]24 super(tr("Save As..."), "save_as", tr("Save the current data to a new file."),
[1808]25 Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save As...")), KeyEvent.VK_S, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT));
[1169]26 }
[1023]27
[1169]28 @Override protected File getFile(Layer layer) {
29 return openFileDialog(layer);
30 }
[444]31}
Note: See TracBrowser for help on using the repository browser.