Last change
on this file since 5419 was 5417, checked in by ulf, 18 years ago |
move the two remaining UtilsPlugin functions from the toolbar to the Tools menu, as they are much more in common with that menu
|
File size:
1.0 KB
|
Line | |
---|
1 | package UtilsPlugin;
|
---|
2 |
|
---|
3 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
4 |
|
---|
5 |
|
---|
6 | import java.awt.event.ActionEvent;
|
---|
7 | import javax.swing.AbstractAction;
|
---|
8 | import javax.swing.JMenu;
|
---|
9 | import javax.swing.JMenuBar;
|
---|
10 | import javax.swing.JMenuItem;
|
---|
11 | import javax.swing.JOptionPane;
|
---|
12 |
|
---|
13 | import javax.swing.JPanel;
|
---|
14 | import javax.swing.BoxLayout;
|
---|
15 |
|
---|
16 | import org.openstreetmap.josm.Main;
|
---|
17 | import org.openstreetmap.josm.plugins.Plugin;
|
---|
18 | import org.openstreetmap.josm.gui.MapFrame;
|
---|
19 | import org.openstreetmap.josm.gui.IconToggleButton;
|
---|
20 |
|
---|
21 | public class UtilsPlugin extends Plugin {
|
---|
22 | JMenuItem MergeNodeWay;
|
---|
23 | JMenuItem SimplifyWay;
|
---|
24 |
|
---|
25 | public UtilsPlugin() {
|
---|
26 | MergeNodeWay = Main.main.menu.toolsMenu.add(new MergeNodeWayAction());
|
---|
27 | MergeNodeWay.setEnabled(false);
|
---|
28 | SimplifyWay = Main.main.menu.toolsMenu.add(new SimplifyWayAction());
|
---|
29 | SimplifyWay.setEnabled(false);
|
---|
30 | }
|
---|
31 |
|
---|
32 | @Override
|
---|
33 | public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
|
---|
34 | if (oldFrame == null && newFrame != null) {
|
---|
35 | MergeNodeWay.setEnabled(true);
|
---|
36 | SimplifyWay.setEnabled(true);
|
---|
37 | }
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.