Changeset 14120 in osm for applications/editors/josm/plugins/imagewaypoint/src
- Timestamp:
- 2009-03-18T15:55:16+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointPlugin.java
r13497 r14120 11 11 12 12 import javax.swing.JFileChooser; 13 import javax.swing.JMenu;14 import javax.swing.JMenuBar;15 import javax.swing.JMenuItem;16 13 import javax.swing.filechooser.FileFilter; 17 14 18 15 import org.openstreetmap.josm.Main; 19 16 import org.openstreetmap.josm.actions.JosmAction; 17 import org.openstreetmap.josm.gui.MainMenu; 20 18 import org.openstreetmap.josm.gui.MapFrame; 21 19 import org.openstreetmap.josm.gui.layer.Layer; … … 98 96 */ 99 97 public ImageWayPointPlugin() { 100 // find the File menu 101 final JMenuBar menuBar = Main.main.menu; 102 JMenu fileMenu = null; 103 104 if (null != menuBar) { 105 for (int index = 0; index < menuBar.getMenuCount() 106 && null == fileMenu; index++) { 107 if (I18n.tr("File").equals(menuBar.getMenu(index).getText())) { 108 fileMenu = menuBar.getMenu(index); 109 } 110 } 111 } 112 113 if (null != fileMenu) { 114 // now create our 'load' menu item and add to the file menu 115 final JMenuItem menuItem = new JMenuItem(new LoadImagesAction(this)); 116 fileMenu.add(menuItem, 2); 117 } 98 MainMenu menu = Main.main.menu; 99 menu.add(menu.fileMenu, new LoadImagesAction(this)); 118 100 } 119 101
Note:
See TracChangeset
for help on using the changeset viewer.