source: josm/trunk/src/org/openstreetmap/josm/actions/NewAction.java@ 627

Last change on this file since 627 was 627, checked in by framm, 16 years ago
  • Property svn:eol-style set to native
File size: 695 bytes
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.event.ActionEvent;
7import java.awt.event.InputEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.Main;
11import org.openstreetmap.josm.data.osm.DataSet;
12import org.openstreetmap.josm.gui.layer.OsmDataLayer;
13
14public class NewAction extends JosmAction {
15
16 public NewAction() {
17 super(tr("New"), "new", tr("Create a new map."), KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK, true);
18 }
19
20 public void actionPerformed(ActionEvent e) {
21 Main.main.addLayer(new OsmDataLayer(new DataSet(), tr("unnamed"), null));
22 }
23}
Note: See TracBrowser for help on using the repository browser.