Ignore:
Timestamp:
2016-09-03T12:37:39+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S1450 - Private fields only used as local variables in methods should become local variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r10647 r10938  
    342342     */
    343343    private class SetOffsetActionListener implements ActionListener {
    344         private JPanel panel;
    345         private JLabel lbExifTime;
    346         private JosmTextField tfGpsTime;
    347         private JosmComboBox<String> cbTimezones;
    348         private ImageDisplay imgDisp;
    349         private JList<String> imgList;
    350344
    351345        @Override
     
    353347            SimpleDateFormat dateFormat = (SimpleDateFormat) DateUtils.getDateTimeFormat(DateFormat.SHORT, DateFormat.MEDIUM);
    354348
    355             panel = new JPanel(new BorderLayout());
     349            JPanel panel = new JPanel(new BorderLayout());
    356350            panel.add(new JLabel(tr("<html>Take a photo of your GPS receiver while it displays the time.<br>"
    357351                    + "Display that photo here.<br>"
     
    359353                    BorderLayout.NORTH);
    360354
    361             imgDisp = new ImageDisplay();
     355            ImageDisplay imgDisp = new ImageDisplay();
    362356            imgDisp.setPreferredSize(new Dimension(300, 225));
    363357            panel.add(imgDisp, BorderLayout.CENTER);
     
    373367            panelTf.add(new JLabel(tr("Photo time (from exif):")), gc);
    374368
    375             lbExifTime = new JLabel();
     369            JLabel lbExifTime = new JLabel();
    376370            gc.gridx = 1;
    377371            gc.weightx = 1.0;
     
    388382            panelTf.add(new JLabel(tr("Gps time (read from the above photo): ")), gc);
    389383
    390             tfGpsTime = new JosmTextField(12);
     384            JosmTextField tfGpsTime = new JosmTextField(12);
    391385            tfGpsTime.setEnabled(false);
    392386            tfGpsTime.setMinimumSize(new Dimension(155, tfGpsTime.getMinimumSize().height));
     
    422416            Collections.sort(vtTimezones);
    423417
    424             cbTimezones = new JosmComboBox<>(vtTimezones.toArray(new String[0]));
     418            JosmComboBox<String> cbTimezones = new JosmComboBox<>(vtTimezones.toArray(new String[0]));
    425419
    426420            String tzId = Main.pref.get("geoimage.timezoneid", "");
     
    446440            JPanel panelLst = new JPanel(new BorderLayout());
    447441
    448             imgList = new JList<>(new AbstractListModel<String>() {
     442            JList<String> imgList = new JList<>(new AbstractListModel<String>() {
    449443                @Override
    450444                public String getElementAt(int i) {
Note: See TracChangeset for help on using the changeset viewer.