Ignore:
Timestamp:
2016-11-29T02:22:12+01:00 (8 years ago)
Author:
Don-vip
Message:

findbugs - disable SE_TRANSIENT_FIELD_NOT_RESTORED, fix some SIC_INNER_SHOULD_BE_STATIC_ANON

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r11329 r11343  
    5959    protected final transient List<Class<? extends DownloadTask>> downloadTasks;
    6060
     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
    6172    /**
    6273     * Create an open action. The name is "Open a file".
     
    237248        final JList<DownloadTask> list = new JList<>(tasks.toArray(new DownloadTask[tasks.size()]));
    238249        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);
    247251        dialog.showDialog();
    248252        return dialog.getValue() == 1 ? list.getSelectedValuesList() : Collections.<DownloadTask>emptyList();
Note: See TracChangeset for help on using the changeset viewer.