Changeset 2344 in josm for trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
- Timestamp:
- 2009-10-29T05:18:55+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r2340 r2344 55 55 static private DownloadDialog instance; 56 56 57 57 58 /** 58 59 * Replies the unique instance of the download dialog … … 75 76 private JCheckBox cbDownloadOsmData = new JCheckBox(tr("OpenStreetMap data"), true); 76 77 private JCheckBox cbDownloadGpxData = new JCheckBox(tr("Raw GPS data")); 78 /** the download action and button */ 79 private DownloadAction actDownload; 80 private SideButton btnDownload; 77 81 78 82 … … 124 128 JPanel pnl = new JPanel(); 125 129 pnl.setLayout(new FlowLayout()); 126 127 pnl.add(new SideButton(new DownloadAction())); 130 131 pnl.add(btnDownload = new SideButton(actDownload = new DownloadAction())); 132 btnDownload.setFocusable(true); 128 133 pnl.add(new SideButton(new CancelAction())); 129 134 pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/DownloadDialog")))); … … 199 204 } 200 205 updateSizeCheck(); 206 } 207 208 /** 209 * Invoked by 210 * @param b 211 */ 212 public void startDownload(Bounds b) { 213 this.currentBounds = b; 214 actDownload.run(); 201 215 } 202 216 … … 343 357 } 344 358 345 public void actionPerformed(ActionEvent e) {359 public void run() { 346 360 if (currentBounds == null) { 347 361 JOptionPane.showMessageDialog( … … 367 381 } 368 382 setCanceled(false); 369 setVisible(false); 383 setVisible(false); 384 } 385 386 public void actionPerformed(ActionEvent e) { 387 run(); 370 388 } 371 389 } … … 375 393 public void windowClosing(WindowEvent e) { 376 394 new CancelAction().run(); 395 } 396 397 @Override 398 public void windowActivated(WindowEvent e) { 399 btnDownload.requestFocusInWindow(); 377 400 } 378 401 }
Note:
See TracChangeset
for help on using the changeset viewer.