Changeset 1647 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2009-06-07T02:56:33+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java
r1212 r1647 23 23 * @author imi 24 24 */ 25 public class PreferencesAction extends JosmAction {25 public class PreferencesAction extends JosmAction implements Runnable { 26 26 27 27 /** … … 37 37 */ 38 38 public void actionPerformed(ActionEvent e) { 39 new Thread(this).start(); 40 } 41 42 public void run() { 39 43 PreferenceDialog prefDlg = new PreferenceDialog(); 40 44 prefDlg.setMinimumSize(new Dimension(400,300)); -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r1465 r1647 39 39 private int num = 1; 40 40 private String msg = ""; 41 41 42 42 public Task(boolean newLayer, OsmServerReader reader, boolean silent, 43 43 int numLayers, String msg) { … … 65 65 dataSet.dataSources.add(new DataSource(currentBounds, "OpenStreetMap server")); 66 66 } 67 67 68 68 OsmDataLayer layer = new OsmDataLayer(dataSet, tr("Data Layer {0}", num), null); 69 69 if (newLayer) … … 71 71 else 72 72 Main.main.editLayer().mergeFrom(layer); 73 73 74 74 Main.pleaseWaitDlg.setCustomText(""); 75 75 } … … 94 94 double t = minlon; minlon = maxlon; maxlon = t; 95 95 } 96 96 97 97 boolean newLayer = action != null 98 98 && (action.dialog == null || action.dialog.newLayer.isSelected()); … … 104 104 message); 105 105 currentBounds = new Bounds(new LatLon(minlat, minlon), new LatLon(maxlat, maxlon)); 106 // We need submit instead of execute so we can wait for it to finish and get the error 106 // We need submit instead of execute so we can wait for it to finish and get the error 107 107 // message if necessary. If no one calls getErrorMessage() it just behaves like execute. 108 task = Main.worker.submit(t, t); 108 task = Main.worker.submit(t, t); 109 109 } 110 110 111 111 public void download(DownloadAction action, double minlat, double minlon, 112 112 double maxlat, double maxlon) { … … 135 135 return "osm"; 136 136 } 137 137 138 138 /** 139 139 * Finds the number of data layers currently opened … … 149 149 return num; 150 150 } 151 151 152 152 /* 153 153 * (non-Javadoc) … … 156 156 public String getErrorMessage() { 157 157 if(task == null) 158 return ""; 158 return ""; 159 159 160 160 try {
Note:
See TracChangeset
for help on using the changeset viewer.