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

Last change on this file since 14120 was 14120, checked in by stoecker, 16 years ago

fix the menu changes in JOSM

  • Property svn:eol-style set to native
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.JMenuItem;
9import javax.swing.JOptionPane;
10import javax.swing.JPanel;
11import javax.swing.BoxLayout;
12
13import org.openstreetmap.josm.Main;
14import org.openstreetmap.josm.plugins.Plugin;
15import org.openstreetmap.josm.gui.MapFrame;
16import org.openstreetmap.josm.gui.MainMenu;
17import org.openstreetmap.josm.gui.IconToggleButton;
18import org.openstreetmap.josm.actions.JosmAction;
19
20public class UtilsPlugin extends Plugin {
21 JMenuItem SimplifyWay;
22 JMenuItem JoinAreas;
23 JumpToAction JumpToAct = new JumpToAction();
24
25 public UtilsPlugin() {
26 SimplifyWay = MainMenu.add(Main.main.menu.toolsMenu, new SimplifyWayAction());
27 JoinAreas = MainMenu.add(Main.main.menu.toolsMenu, new JoinAreasAction());
28 SimplifyWay.setEnabled(false);
29 }
30
31 @Override
32 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
33 if (oldFrame == null && newFrame != null) {
34 SimplifyWay.setEnabled(true);
35 JoinAreas.setEnabled(true);
36 newFrame.statusLine.addMouseListener(JumpToAct);
37 }
38 }
39}
Note: See TracBrowser for help on using the repository browser.