| 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.MainMenu;
|
|---|
| 20 | import org.openstreetmap.josm.gui.IconToggleButton;
|
|---|
| 21 | import org.openstreetmap.josm.actions.JosmAction;
|
|---|
| 22 |
|
|---|
| 23 | public class UtilsPlugin extends Plugin {
|
|---|
| 24 | JMenuItem SimplifyWay;
|
|---|
| 25 |
|
|---|
| 26 | public UtilsPlugin() {
|
|---|
| 27 | SimplifyWay = MainMenu.add(Main.main.menu.toolsMenu, new SimplifyWayAction());
|
|---|
| 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 | }
|
|---|
| 36 | }
|
|---|
| 37 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.