Ignore:
Timestamp:
2009-10-29T05:18:55+01:00 (14 years ago)
Author:
Gubaer
Message:

fixed #3525: Double-clicking on a bookmark should initiate its download
fixed #3802: Download button is not highlighted anymore in the download dialog
Improved bookmark tab in Download Dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r2340 r2344  
    5555    static private DownloadDialog instance;
    5656   
     57   
    5758    /**
    5859     * Replies the unique instance of the download dialog
     
    7576    private JCheckBox cbDownloadOsmData = new JCheckBox(tr("OpenStreetMap data"), true);
    7677    private JCheckBox cbDownloadGpxData = new JCheckBox(tr("Raw GPS data"));
     78    /** the download action and button */
     79    private DownloadAction actDownload;
     80    private SideButton btnDownload;
    7781
    7882   
     
    124128        JPanel pnl = new JPanel();
    125129        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);
    128133        pnl.add(new SideButton(new CancelAction()));
    129134        pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/DownloadDialog"))));
     
    199204        }
    200205        updateSizeCheck();
     206    }
     207   
     208    /**
     209     * Invoked by
     210     * @param b
     211     */
     212    public void startDownload(Bounds b) {
     213        this.currentBounds = b;
     214        actDownload.run();
    201215    }
    202216   
     
    343357        }
    344358       
    345         public void actionPerformed(ActionEvent e) {
     359        public void run() {
    346360            if (currentBounds == null) {
    347361                JOptionPane.showMessageDialog(
     
    367381            }
    368382            setCanceled(false);
    369             setVisible(false);           
     383            setVisible(false); 
     384        }
     385       
     386        public void actionPerformed(ActionEvent e) {
     387            run();
    370388        }       
    371389    }
     
    375393        public void windowClosing(WindowEvent e) {
    376394            new CancelAction().run();
     395        }
     396
     397        @Override
     398        public void windowActivated(WindowEvent e) {
     399            btnDownload.requestFocusInWindow();
    377400        }       
    378401    }
Note: See TracChangeset for help on using the changeset viewer.