Changeset 2529 in josm
- Timestamp:
- 2009-11-28T13:22:02+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r2512 r2529 2 2 package org.openstreetmap.josm.gui.download; 3 3 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 6 … … 45 46 import org.openstreetmap.josm.tools.OsmUrlToBounds; 46 47 import org.openstreetmap.josm.tools.WindowGeometry; 47 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;48 48 49 49 /** … … 62 62 */ 63 63 static public DownloadDialog getInstance() { 64 if (instance == null) 64 if (instance == null) { 65 65 instance = new DownloadDialog(Main.parent); 66 } 66 67 return instance; 67 68 } … … 79 80 private DownloadAction actDownload; 80 81 private SideButton btnDownload; 82 83 private void makeCheckBoxRespondToEnter(JCheckBox cb) { 84 cb.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "doDownload"); 85 cb.getActionMap().put("doDownload", actDownload); 86 } 81 87 82 88 public JPanel buildMainPanel() { … … 140 146 btnDownload.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "download"); 141 147 btnDownload.getActionMap().put("download",actDownload); 148 makeCheckBoxRespondToEnter(cbDownloadGpxData); 149 makeCheckBoxRespondToEnter(cbDownloadOsmData); 150 makeCheckBoxRespondToEnter(cbNewLayer); 142 151 143 152 // -- cancel button … … 307 316 mv.getLatLon(0, mv.getHeight()), 308 317 mv.getLatLon(mv.getWidth(), 0) 309 318 ); 310 319 boundingBoxChanged(currentBounds,null); 311 320 } … … 398 407 tr("<html>Neither <strong>{0}</strong> nor <strong>{1}</strong> is enabled.<br>" 399 408 + "Please chose to either download OSM data, or GPX data, or both.</html>", 400 cbDownloadOsmData.getText(),401 cbDownloadGpxData.getText()409 cbDownloadOsmData.getText(), 410 cbDownloadGpxData.getText() 402 411 ), 403 412 tr("Error"),
Note:
See TracChangeset
for help on using the changeset viewer.