Changeset 14120 in osm for applications
- Timestamp:
- 2009-03-18T15:55:16+01:00 (16 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/build.xml
r14015 r14120 26 26 <attribute name="Plugin-Description" value="A special handler for the french land registry WMS server."/> 27 27 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/FR:JOSM/Fr:Plugin/Cadastre"/> 28 <attribute name="Plugin-Mainversion" value="14 65"/>28 <attribute name="Plugin-Mainversion" value="1498"/> 29 29 <attribute name="Plugin-Stage" value="60"/> 30 30 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
r13784 r14120 1 1 package cadastre_fr; 2 2 3 import static org.openstreetmap.josm.tools.I18n.marktr; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 4 5 … … 10 11 import javax.swing.JCheckBoxMenuItem; 11 12 import javax.swing.JMenu; 12 import javax.swing.JMenuBar;13 13 import javax.swing.JMenuItem; 14 14 import javax.swing.JOptionPane; … … 20 20 import org.openstreetmap.josm.actions.UploadAction.UploadHook; 21 21 import org.openstreetmap.josm.gui.IconToggleButton; 22 import org.openstreetmap.josm.gui.MainMenu; 22 23 import org.openstreetmap.josm.gui.MapFrame; 23 24 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; … … 26 27 27 28 /** 28 * 29 * 29 30 * Plugin to access the french Cadastre WMS server at www.cadastre.gouv.fr This 30 31 * WMS server requires some specific handling like retrieving a cookie for a 31 32 * limitation in case of no activity, or the request to the server shall provide 32 33 * a city/town/village code. 33 * 34 * @author Pieren <pieren3@gmail.com>, 34 * 35 * @author Pieren <pieren3@gmail.com>, 35 36 * @author <matthieu.lochegnies@gmail.com> for the extension to codeCommune 36 37 * @version 0.8 37 * History: 38 * 0.1 17-Jun-2008 first prototype using a first Lambert projection impl. in core 38 * History: 39 * 0.1 17-Jun-2008 first prototype using a first Lambert projection impl. in core 39 40 * 0.2 22-Jun-2008 first stable version 40 41 * 0.3 24-Jun-2008 add code departement … … 43 44 * - add option to force a Lambert zone (for median locations) 44 45 * - add auto-sourcing 45 * 0.5 16-Aug-2008 - add transparency in layer (allowing multiple wms layers displayed together) 46 * 0.5 16-Aug-2008 - add transparency in layer (allowing multiple wms layers displayed together) 46 47 * - no overlapping of grabbed images if transparency is enabled 47 48 * - set one layer per location … … 61 62 * - validate projection name by Lambert.toString() method 62 63 * 0.8 25-Jan-2009 - display returned list of communes if direct name is not recognized by server 63 * - new possible grab factor of 100 square meters fixed size 64 * - new possible grab factor of 100 square meters fixed size 64 65 * - minor fixes due to changes in JOSM core classes 65 * - first draft of raster image support 66 * - first draft of raster image support 66 67 * 0.9 05-Feb-2009 - grab vectorized full commune bbox, save in file, convert to OSM way 67 68 * and simplify 68 * 1.0 18-Feb-2009 - fix various bugs in color management and preference dialog 69 * 1.0 18-Feb-2009 - fix various bugs in color management and preference dialog 69 70 * - increase PNG picture size requested to WMS (800x1000) 70 * - set 4th grab scale fixed size configurable (from 25 to 1000 meters) 71 * - set 4th grab scale fixed size configurable (from 25 to 1000 meters) 71 72 */ 72 73 public class CadastrePlugin extends Plugin { … … 78 79 79 80 public static String source = ""; 80 81 81 82 // true if the checkbox "auto-sourcing" is set in the plugin menu 82 83 public static boolean autoSourcing = false; 83 84 84 85 // true when the plugin is first used, e.g. grab from WMS or download cache file 85 86 public static boolean pluginUsed = false; 86 87 87 88 public static String cacheDir = null; 88 89 89 90 public static boolean alterColors = false; 90 91 91 92 public static boolean backgroundTransparent = false; 92 93 93 94 public static float transparency = 1.0f; 94 95 95 96 public static boolean drawBoundaries = false; 96 97 97 98 static private boolean menuEnabled = false; 98 99 99 100 /** 100 101 * Creates the plugin and setup the default settings if necessary 101 * 102 * 102 103 * @throws Exception 103 104 */ … … 123 124 public void refreshMenu() throws Exception { 124 125 boolean isLambertProjection = Main.proj.toString().equals(new Lambert().toString()); 125 JMenuBarmenu = Main.main.menu;126 MainMenu menu = Main.main.menu; 126 127 127 128 if (cadastreJMenu == null) { 128 cadastreJMenu = new JMenu(tr("Cadastre")); 129 cadastreJMenu.setMnemonic(KeyEvent.VK_C); 130 menu.add(cadastreJMenu, menu.getMenuCount()-2); 129 cadastreJMenu = menu.addMenu(marktr("Cadastre"), KeyEvent.VK_C, menu.defaultMenuPos); 131 130 if (isLambertProjection) { 132 131 JosmAction grab = new MenuActionGrab(); … … 138 137 JMenuItem menuSettings = new JMenuItem(new MenuActionNewLocation()); 139 138 final JCheckBoxMenuItem menuSource = new JCheckBoxMenuItem(tr("Auto sourcing")); 140 menuSource.setSelected(autoSourcing); 139 menuSource.setSelected(autoSourcing); 141 140 menuSource.addActionListener(new ActionListener() { 142 141 public void actionPerformed(ActionEvent ev) { … … 145 144 } 146 145 }); 147 146 148 147 JMenuItem menuResetCookie = new JMenuItem(new MenuActionResetCookie()); 149 148 JMenuItem menuLambertZone = new JMenuItem(new MenuActionLambertZone()); … … 151 150 //JMenuItem menuActionBoundaries = new JMenuItem(new MenuActionBoundaries()); 152 151 //JMenuItem menuActionBuildings = new JMenuItem(new MenuActionBuildings()); 153 152 154 153 cadastreJMenu.add(menuGrab); 155 154 cadastreJMenu.add(menuSettings); … … 159 158 cadastreJMenu.add(menuLoadFromCache); 160 159 // all SVG features disabled until official WMS is released 161 //cadastreJMenu.add(menuActionBoundaries); 160 //cadastreJMenu.add(menuActionBoundaries); 162 161 //cadastreJMenu.add(menuActionBuildings); 163 162 } else { -
applications/editors/josm/plugins/duplicateway/src/org/openstreetmap/josm/plugins/duplicateway/DuplicateWayPlugin.java
r13497 r14120 20 20 public DuplicateWayPlugin() { 21 21 name = tr("Duplicate Way"); 22 JMenu toolsMenu = null; 23 for (int i = 0; i < Main.main.menu.getMenuCount() && toolsMenu == null; i++) { 24 JMenu menu = Main.main.menu.getMenu(i); 25 String name = menu.getText(); 26 if (name != null && name.equals(tr("Tools"))) { 27 toolsMenu = menu; 28 } 29 } 30 31 if (toolsMenu == null) { 32 toolsMenu = new JMenu(name); 33 toolsMenu.add(new JMenuItem(new DuplicateWayAction())); 34 Main.main.menu.add(toolsMenu, 2); 35 } 36 else { 37 toolsMenu.addSeparator(); 38 toolsMenu.add(new JMenuItem(new DuplicateWayAction())); 39 } 40 22 JMenu toolsMenu = Main.main.menu.toolsMenu; 23 toolsMenu.addSeparator(); 24 toolsMenu.add(new JMenuItem(new DuplicateWayAction())); 41 25 } 42 43 26 } -
applications/editors/josm/plugins/grid/src/grid/GridPlugin.java
r13497 r14120 15 15 import org.openstreetmap.josm.data.osm.DataSet; 16 16 import org.openstreetmap.josm.data.osm.Node; 17 import org.openstreetmap.josm.data.osm.Segment;18 17 import org.openstreetmap.josm.data.osm.Way; 19 18 import org.openstreetmap.josm.data.osm.visitor.AddVisitor; … … 26 25 private class Action extends AbstractAction { 27 26 public Action() { 28 super( "add grid");27 super(tr("Add grid")); 29 28 } 30 29 public void actionPerformed(ActionEvent e) { … … 38 37 39 38 public GridPlugin() { 40 JMenuBar menu = Main.main.menu; 41 edit = null; 42 for (int i = 0; i < menu.getMenuCount(); ++i) { 43 if (menu.getMenu(i) != null && tr("Edit").equals(menu.getMenu(i).getName())) { 44 edit = menu.getMenu(i); 45 break; 46 } 47 } 48 if (edit == null) { 49 edit = new JMenu(tr("Edit")); 50 menu.add(edit, 2); 51 edit.setVisible(false); 52 } 53 edit.add(addGridMenu); 54 addGridMenu.setVisible(false); 39 edit = Main.main.menu.editMenu; 40 edit.add(addGridMenu); 41 addGridMenu.setVisible(false); 55 42 } 56 43 @Override -
applications/editors/josm/plugins/imagewaypoint/build.xml
r14015 r14120 26 26 <attribute name="Plugin-Description" value="Another plugin to match images to the waypoints in a GPX file. A match is made when the 'name', 'cmt' or 'desc' attribute of a waypoint tag matches the filename of an image."/> 27 27 <attribute name="Plugin-Early" value="false"/> 28 <attribute name="Plugin-Mainversion" value="14 65"/>28 <attribute name="Plugin-Mainversion" value="1498"/> 29 29 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 30 30 </manifest> -
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 -
applications/editors/josm/plugins/livegps/build.xml
r14015 r14120 26 26 <attribute name="Plugin-Description" value="Support live GPS input (moving dot) through a connection to gpsd server."/> 27 27 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/LiveGPS"/> 28 <attribute name="Plugin-Mainversion" value="14 65"/>28 <attribute name="Plugin-Mainversion" value="1498"/> 29 29 <attribute name="Plugin-Stage" value="50"/> 30 30 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> -
applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java
r14057 r14120 1 1 package livegps; 2 2 3 import static org.openstreetmap.josm.tools.I18n.marktr; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 4 5 … … 11 12 import javax.swing.JCheckBoxMenuItem; 12 13 import javax.swing.JMenu; 13 import javax.swing.JMenuBar;14 14 import javax.swing.JMenuItem; 15 15 … … 80 80 { 81 81 MainMenu menu = Main.main.menu; 82 lgpsmenu = new JMenu(tr("LiveGPS")); 83 menu.add(lgpsmenu, KeyEvent.VK_G, "livegps"); 84 menu.add(lgpsmenu, 5); 82 lgpsmenu = menu.addMenu(marktr("LiveGPS"), KeyEvent.VK_G, menu.defaultMenuPos); 85 83 86 84 JosmAction captureAction = new CaptureAction(); -
applications/editors/josm/plugins/navigator/src/at/dallermassl/josm/plugin/navigator/NavigatorPlugin.java
r13497 r14120 4 4 package at.dallermassl.josm.plugin.navigator; 5 5 6 import static org.openstreetmap.josm.tools.I18n.marktr; 6 7 import static org.openstreetmap.josm.tools.I18n.tr; 7 8 … … 11 12 12 13 import javax.swing.JMenu; 13 import javax.swing.JMenuBar;14 14 import javax.swing.JMenuItem; 15 15 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.MainMenu; 17 18 import org.openstreetmap.josm.gui.IconToggleButton; 18 19 import org.openstreetmap.josm.gui.MapFrame; … … 41 42 navigatorLayer.setNavigatorNodeModel(navigatorModel); 42 43 43 JMenuBarmenu = Main.main.menu;44 JMenu navigatorMenu = new JMenu(tr("Navigation"));44 MainMenu menu = Main.main.menu; 45 JMenu navigatorMenu = menu.addMenu(marktr("Navigation"), KeyEvent.VK_N, menu.defaultMenuPos); 45 46 JMenuItem navigatorMenuItem = new JMenuItem(new NavigatorAction(this)); 46 47 navigatorMenu.add(navigatorMenuItem); -
applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisiblePlugin.java
r13497 r14120 3 3 */ 4 4 package at.dallermassl.josm.plugin.openvisible; 5 6 import javax.swing.JMenu;7 import javax.swing.JMenuItem;8 5 9 6 import org.openstreetmap.josm.Main; -
applications/editors/josm/plugins/osmarender/src/OsmarenderPlugin.java
r13497 r14120 13 13 import javax.swing.AbstractAction; 14 14 import javax.swing.JLabel; 15 import javax.swing.JMenu;16 import javax.swing.JMenuBar;17 15 import javax.swing.JMenuItem; 18 16 import javax.swing.JOptionPane; -
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorPlugin.java
r13497 r14120 13 13 import javax.swing.JFrame; 14 14 import javax.swing.JMenu; 15 import javax.swing.JMenuItem;16 15 import javax.swing.JOptionPane; 17 16 import javax.swing.KeyStroke; -
applications/editors/josm/plugins/tcxplugin/src/org/openstreetmap/josm/plugins/TcxPlugin.java
r13497 r14120 2 2 * josm.tcx.plugin 3 3 * (c) Copyright by M.IT 2002-2008 4 * www.emaitie.de 4 * www.emaitie.de 5 5 */ 6 6 … … 15 15 16 16 import javax.swing.JFileChooser; 17 import javax.swing.JMenu;18 import javax.swing.JMenuItem;19 17 20 18 import org.openstreetmap.josm.Main; … … 41 39 KeyEvent.VK_T, Shortcut.GROUP_MENU)); 42 40 } 43 41 44 42 private void addTcxFileFilter() 45 43 { … … 49 47 // => check if filters contains a tcx entry, if not create a new array with tcx in it 50 48 // assign it to filters 51 52 // TODO later we can remove the filter from the file filter list, so the extension does not appear 49 50 // TODO later we can remove the filter from the file filter list, so the extension does not appear 53 51 // when the user wants to open a normal file. 54 52 } 55 53 56 54 57 55 public void actionPerformed(ActionEvent e) -
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/UtilsPlugin.java
r13723 r14120 6 6 import java.awt.event.ActionEvent; 7 7 import javax.swing.AbstractAction; 8 import javax.swing.JMenu;9 import javax.swing.JMenuBar;10 8 import javax.swing.JMenuItem; 11 9 import javax.swing.JOptionPane; 12 13 10 import javax.swing.JPanel; 14 11 import javax.swing.BoxLayout; -
applications/editors/josm/plugins/wmsplugin/build.xml
r14015 r14120 29 29 <attribute name="Plugin-Description" value="Display georeferenced images as background in JOSM (WMS servers, Yahoo, ...)."/> 30 30 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WMSPlugin"/> 31 <attribute name="Plugin-Mainversion" value="14 65"/>31 <attribute name="Plugin-Mainversion" value="1498"/> 32 32 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 33 33 <attribute name="de_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/DE:JOSM/Plugins/WMSPlugin"/> -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java
r13648 r14120 1 1 package wmsplugin; 2 2 3 import static org.openstreetmap.josm.tools.I18n.marktr; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 4 5 5 6 6 import java.awt.event.ActionEvent; … … 16 16 import javax.swing.AbstractButton; 17 17 import javax.swing.JMenu; 18 import javax.swing.JMenuBar;19 18 import javax.swing.JMenuItem; 20 19 … … 130 129 MainMenu menu = Main.main.menu; 131 130 132 if (wmsJMenu == null) { 133 wmsJMenu = new JMenu(tr("WMS")); 134 menu.add(wmsJMenu, KeyEvent.VK_W, "wms"); 135 menu.add(wmsJMenu, 5); 136 } else { 131 if (wmsJMenu == null) 132 wmsJMenu = menu.addMenu(marktr("WMS"), KeyEvent.VK_W, menu.defaultMenuPos); 133 else 137 134 wmsJMenu.removeAll(); 138 }139 135 140 136 // for each configured WMSInfo, add a menu entry.
Note:
See TracChangeset
for help on using the changeset viewer.