| Revision 3753,
952 bytes
checked in by stoecker, 14 months ago
(diff) |
|
fix help topics
|
-
Property svn:eol-style set to
native
|
| 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.ActionEvent; |
|---|
| 8 | import java.awt.event.KeyEvent; |
|---|
| 9 | |
|---|
| 10 | import org.openstreetmap.josm.Main; |
|---|
| 11 | import org.openstreetmap.josm.data.osm.DataSet; |
|---|
| 12 | import org.openstreetmap.josm.gui.layer.OsmDataLayer; |
|---|
| 13 | import org.openstreetmap.josm.tools.Shortcut; |
|---|
| 14 | |
|---|
| 15 | public class NewAction extends JosmAction { |
|---|
| 16 | |
|---|
| 17 | public NewAction() { |
|---|
| 18 | super(tr("New Layer"), "new", tr("Create a new map layer."), |
|---|
| 19 | Shortcut.registerShortcut("system:new", tr("File: {0}", tr("New Layer")), KeyEvent.VK_N, Shortcut.GROUP_MENU), true); |
|---|
| 20 | putValue("help", ht("/Action/NewLayer")); |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | public void actionPerformed(ActionEvent e) { |
|---|
| 24 | Main.main.addLayer(new OsmDataLayer(new DataSet(), OsmDataLayer.createNewName(), null)); |
|---|
| 25 | } |
|---|
| 26 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.