source: osm/applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/UtilsPlugin.java@ 5449

Last change on this file since 5449 was 5449, checked in by ulf, 17 years ago

rename mergenodeway to joinnodeway, to reflect it's menu name

File size: 1.2 KB
Line 
1package UtilsPlugin;
2
3import static org.openstreetmap.josm.tools.I18n.tr;
4
5
6import java.awt.event.ActionEvent;
7import javax.swing.AbstractAction;
8import javax.swing.JMenu;
9import javax.swing.JMenuBar;
10import javax.swing.JMenuItem;
11import javax.swing.JOptionPane;
12
13import javax.swing.JPanel;
14import javax.swing.BoxLayout;
15
16import org.openstreetmap.josm.Main;
17import org.openstreetmap.josm.plugins.Plugin;
18import org.openstreetmap.josm.gui.MapFrame;
19import org.openstreetmap.josm.gui.IconToggleButton;
20import org.openstreetmap.josm.actions.JosmAction;
21
22public class UtilsPlugin extends Plugin {
23 JMenuItem JoinNodeWay;
24 JMenuItem SimplifyWay;
25
26 public UtilsPlugin() {
27 JosmAction action;
28
29 action = new JoinNodeWayAction();
30 JoinNodeWay = Main.main.menu.toolsMenu.add(action);
31 JoinNodeWay.setAccelerator(action.shortCut);
32 JoinNodeWay.setEnabled(false);
33
34 action = new SimplifyWayAction();
35 SimplifyWay = Main.main.menu.toolsMenu.add(action);
36 SimplifyWay.setAccelerator(action.shortCut);
37 SimplifyWay.setEnabled(false);
38 }
39
40 @Override
41 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
42 if (oldFrame == null && newFrame != null) {
43 JoinNodeWay.setEnabled(true);
44 SimplifyWay.setEnabled(true);
45 }
46 }
47}
Note: See TracBrowser for help on using the repository browser.