Changeset 11343 in josm for trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
- Timestamp:
- 2016-11-29T02:22:12+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
r11329 r11343 59 59 protected final transient List<Class<? extends DownloadTask>> downloadTasks; 60 60 61 static class WhichTasksToPerformDialog extends ExtendedDialog { 62 WhichTasksToPerformDialog(JList<DownloadTask> list) { 63 super(Main.parent, tr("Which tasks to perform?"), new String[]{tr("Ok"), tr("Cancel")}, true); 64 setButtonIcons(new String[]{"ok", "cancel"}); 65 final JPanel pane = new JPanel(new GridLayout(2, 1)); 66 pane.add(new JLabel(tr("Which tasks to perform?"))); 67 pane.add(list); 68 setContent(pane); 69 } 70 } 71 61 72 /** 62 73 * Create an open action. The name is "Open a file". … … 237 248 final JList<DownloadTask> list = new JList<>(tasks.toArray(new DownloadTask[tasks.size()])); 238 249 list.addSelectionInterval(0, tasks.size() - 1); 239 final ExtendedDialog dialog = new ExtendedDialog(Main.parent, 240 tr("Which tasks to perform?"), new String[]{tr("Ok"), tr("Cancel")}, true) { { 241 setButtonIcons(new String[]{"ok", "cancel"}); 242 final JPanel pane = new JPanel(new GridLayout(2, 1)); 243 pane.add(new JLabel(tr("Which tasks to perform?"))); 244 pane.add(list); 245 setContent(pane); 246 } }; 250 final ExtendedDialog dialog = new WhichTasksToPerformDialog(list); 247 251 dialog.showDialog(); 248 252 return dialog.getValue() == 1 ? list.getSelectedValuesList() : Collections.<DownloadTask>emptyList();
Note:
See TracChangeset
for help on using the changeset viewer.