Changeset 2347 in josm for trunk/src/org/openstreetmap/josm/gui/download
- Timestamp:
- 2009-10-29T07:30:49+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r2346 r2347 135 135 JPanel pnl = new JPanel(); 136 136 pnl.setLayout(new FlowLayout()); 137 137 138 // -- download button 138 139 pnl.add(btnDownload = new SideButton(actDownload = new DownloadAction())); 139 140 btnDownload.setFocusable(true); 140 141 btnDownload.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "download"); 141 142 btnDownload.getActionMap().put("download",actDownload); 142 pnl.add(new SideButton(new CancelAction())); 143 pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/DownloadDialog")))); 143 144 // -- cancel button 145 SideButton btnCancel; 146 CancelAction actCancel = new CancelAction(); 147 pnl.add(btnCancel = new SideButton(actCancel)); 148 btnCancel.setFocusable(true); 149 btnCancel.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter"); 150 btnCancel.getActionMap().put("enter",actCancel); 151 152 // -- cancel on ESC 153 getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0), "cancel"); 154 getRootPane().getActionMap().put("cancel", actCancel); 155 156 // -- help button 157 SideButton btnHelp; 158 pnl.add(btnHelp = new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/DownloadDialog")))); 159 btnHelp.setFocusable(true); 160 btnHelp.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter"); 161 btnHelp.getActionMap().put("enter",btnHelp.getAction()); 162 144 163 return pnl; 145 164 }
Note:
See TracChangeset
for help on using the changeset viewer.