Changeset 28106 in osm for applications/editors/josm
- Timestamp:
- 2012-03-16T22:50:32+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/mirrored_download
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mirrored_download/build.xml
r27852 r28106 86 86 <attribute name="Plugin-Description" value="Simplifies download from different read-only APIs."/> 87 87 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/mirrored_download"/> 88 <attribute name="Plugin-Mainversion" value=" 4980"/>88 <attribute name="Plugin-Mainversion" value="5089"/> 89 89 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 90 90 </manifest> -
applications/editors/josm/plugins/mirrored_download/src/mirrored_download/MirroredDownloadPlugin.java
r27877 r28106 1 1 package mirrored_download; 2 2 3 import static org.openstreetmap.josm.tools.I18n.marktr;4 5 import java.awt.event.KeyEvent;6 7 3 import javax.swing.JMenu; 8 import javax.swing.JMenuItem;9 4 10 5 import org.openstreetmap.josm.Main; 11 import org.openstreetmap.josm.actions.JosmAction;12 import org.openstreetmap.josm.data.ProjectionBounds;13 import org.openstreetmap.josm.gui.IconToggleButton;14 6 import org.openstreetmap.josm.gui.MainMenu; 15 import org.openstreetmap.josm.gui.MapFrame;16 import org.openstreetmap.josm.gui.MapView;17 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;18 import org.openstreetmap.josm.io.CacheFiles;19 import org.openstreetmap.josm.io.MirroredInputStream;20 7 import org.openstreetmap.josm.plugins.Plugin; 21 8 import org.openstreetmap.josm.plugins.PluginInformation; … … 23 10 public class MirroredDownloadPlugin extends Plugin { 24 11 25 static JMenu jMenu;12 static JMenu jMenu; 26 13 27 public MirroredDownloadPlugin(PluginInformation info)28 {29 super(info);30 MainMenu.add(Main.main.menu.fileMenu, new DownloadAction2());31 MainMenu.add(Main.main.menu.fileMenu, new UrlSelectionAction());32 }14 public MirroredDownloadPlugin(PluginInformation info) { 15 super(info); 16 MainMenu.addAfter(Main.main.menu.fileMenu, new DownloadAction2(), false, Main.main.menu.download); 17 MainMenu.add(Main.main.menu.editMenu, new UrlSelectionAction()); 18 } 19 private static String downloadUrl = "http://overpass.osm.rambler.ru/cgi/xapi?";//"http://overpass-api.de/api/xapi?"; 33 20 34 private static String downloadUrl = "http://overpass.osm.rambler.ru/cgi/xapi?";//"http://overpass-api.de/api/xapi?"; 21 public static String getDownloadUrl() { 22 return downloadUrl; 23 } 35 24 36 public static String getDownloadUrl() { 37 return downloadUrl; 38 } 39 40 public static void setDownloadUrl(String downloadUrl_) { 41 downloadUrl = downloadUrl_; 42 } 25 public static void setDownloadUrl(String downloadUrl_) { 26 downloadUrl = downloadUrl_; 27 } 43 28 } -
applications/editors/josm/plugins/mirrored_download/src/mirrored_download/UrlSelectionAction.java
r27906 r28106 6 6 7 7 import java.awt.event.ActionEvent; 8 import java.awt.event.KeyEvent;9 import java.util.concurrent.Future;10 8 11 9 import org.openstreetmap.josm.actions.JosmAction; 12 10 13 import org.openstreetmap.josm.Main;14 import org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTask;15 import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler;16 import org.openstreetmap.josm.data.Bounds;17 import org.openstreetmap.josm.gui.download.DownloadDialog;18 import org.openstreetmap.josm.tools.Shortcut;19 11 20 12 /** … … 24 16 25 17 public UrlSelectionAction() { 26 super(tr("Select URL..."), null, tr("Select URL to download from."), 27 Shortcut.registerShortcut("file:selecturl", tr("File: {0}", tr("Select URL...")), KeyEvent.VK_D, Shortcut.CTRL_SHIFT), 28 true, "mirroreddownload/urlselection", true); 18 super(tr("Select OSM mirror URL"), null, tr("Select OSM mirror URL to download from."), 19 null, true, "mirroreddownload/urlselection", true); 29 20 putValue("help", ht("/Action/SelectUrl")); 30 21 }
Note:
See TracChangeset
for help on using the changeset viewer.