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

Last change on this file since 12443 was 11974, checked in by frederik, 17 years ago

changes in some JOSM plugins due to a renamed class in JOSM.

File size: 1013 bytes
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 SimplifyWay;
24
25 public UtilsPlugin() {
26 JosmAction action;
27
28 action = new SimplifyWayAction();
29 SimplifyWay = Main.main.menu.toolsMenu.add(action);
30 SimplifyWay.setAccelerator(action.shortcut);
31 SimplifyWay.setEnabled(false);
32 }
33
34 @Override
35 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
36 if (oldFrame == null && newFrame != null) {
37 SimplifyWay.setEnabled(true);
38 }
39 }
40}
Note: See TracBrowser for help on using the repository browser.