Changeset 6070 in josm for trunk/src/org/openstreetmap/josm/gui/io
- Timestamp:
- 2013-07-17T00:01:49+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/io
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/ActionFlagsTableCell.java
r5302 r6070 28 28 * handles everything on its own, in other words it renders itself and also functions 29 29 * as editor so the checkboxes may be set by the user. 30 * 30 * 31 31 * Intended usage is like this: 32 32 * ActionFlagsTableCell aftc = new ActionFlagsTableCell(); -
trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java
r5266 r6070 15 15 * Sets the current changeset comment and notifies observers if the comment 16 16 * has changed. 17 * 17 * 18 18 * @param comment the new upload comment. Empty string assumed if null. 19 19 */ … … 29 29 /** 30 30 * Replies the current changeset comment in this model. 31 * 31 * 32 32 * @return the current changeset comment in this model. 33 33 */ -
trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java
r5874 r6070 49 49 this.mkdir = mkdir; 50 50 this.unpack = unpack; 51 } 52 51 } 52 53 53 private static class DownloadException extends Exception { 54 54 public DownloadException(String msg) { … … 68 68 69 69 70 @Override 70 @Override 71 71 protected void cancel() { 72 72 this.canceled = true; … … 74 74 } 75 75 76 @Override 76 @Override 77 77 protected void finish() {} 78 78 … … 91 91 } 92 92 } 93 93 94 94 URL url = new URL(address); 95 95 int size; … … 100 100 size = downloadConnection.getContentLength(); 101 101 } 102 102 103 103 progressMonitor.setTicksCount(100); 104 104 progressMonitor.subTask(tr("Downloading File {0}: {1} bytes...", file.getName(),size)); 105 105 106 106 in = downloadConnection.getInputStream(); 107 107 out = new FileOutputStream(file); … … 112 112 out.write(buffer, 0, read); 113 113 count+=read; 114 if (canceled) break; 114 if (canceled) break; 115 115 p2 = 100 * count / size; 116 116 if (p2!=p1) { … … 142 142 } 143 143 144 @Override 144 @Override 145 145 protected void realRun() throws SAXException, IOException { 146 146 if (canceled) return; … … 160 160 return canceled; 161 161 } 162 162 163 163 /** 164 164 * Recursive unzipping function … … 166 166 * @param file 167 167 * @param dir 168 * @throws IOException 168 * @throws IOException 169 169 */ 170 170 public static void unzipFileRecursively(File file, String dir) throws IOException { -
trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesTask.java
r5791 r6070 95 95 if (osm == null) { 96 96 switch (id.getType()) { 97 case NODE: 97 case NODE: 98 98 osm = new Node(id.getUniqueId()); 99 99 break; … … 128 128 DataSetMerger merger = new DataSetMerger(ds, theirDataSet); 129 129 merger.merge(); 130 130 131 131 // if incomplete relation members exist, download them too 132 132 for (Relation r : ds.getRelations()) { … … 165 165 } 166 166 } 167 167 168 168 } catch(Exception e) { 169 169 if (canceled) return; … … 171 171 } 172 172 } 173 173 174 174 /** 175 175 * replies the set of ids of all primitives for which a fetch request to the -
trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java
r5729 r6070 49 49 }); 50 50 } 51 51 52 52 private void rebuild() { 53 53 removeAll(); -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r5998 r6070 56 56 * This is a dialog for entering upload options like the parameters for 57 57 * the upload changeset and the strategy for opening/closing a changeset. 58 * 58 * 59 59 */ 60 60 public class UploadDialog extends JDialog implements PropertyChangeListener, PreferenceChangedListener{ … … 111 111 // 112 112 pnl.add(pnlUploadedObjects = new UploadedObjectsSummaryPanel(), GBC.eol().fill(GBC.BOTH)); 113 113 114 114 // Custom components 115 115 for (Component c : customComponents) { … … 309 309 public void setDefaultChangesetTags(Map<String, String> tags) { 310 310 pnlTagSettings.setDefaultTags(tags); 311 for (String key: tags.keySet()) { 312 if (key.equals("comment")) { 311 for (String key: tags.keySet()) { 312 if (key.equals("comment")) { 313 313 changesetCommentModel.setComment(tags.get(key)); 314 } 315 } 314 } 315 } 316 316 } 317 317 … … 370 370 super.setVisible(visible); 371 371 } 372 373 /** 374 * Adds a custom component to this dialog. 372 373 /** 374 * Adds a custom component to this dialog. 375 375 * Custom components added at JOSM startup are displayed between the objects list and the properties tab pane. 376 376 * @param c The custom component to add. If {@code null}, this method does nothing. -
trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
r5998 r6070 264 264 putValue(Action.NAME, tr("Cancel")); 265 265 putValue(Action.SMALL_ICON, ImageProvider.get("", "cancel")); 266 getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) 267 .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); 266 getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) 267 .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); 268 268 getRootPane().getActionMap().put("ESCAPE", this); 269 269 setEnabled(true);
Note:
See TracChangeset
for help on using the changeset viewer.