Changeset 6267 in josm


Ignore:
Timestamp:
2013-09-27T13:38:15+02:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/FindBugs - Replace singular fields by local variables

Location:
trunk/src/org/openstreetmap/josm
Files:
30 edited

Legend:

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

    r6246 r6267  
    4040    private JosmTextField zm = new JosmTextField();
    4141
    42     private double zoomFactor = 0;
    4342    public void showJumpToDialog() {
    4443        MapView mv = Main.map.mapView;
     
    5049
    5150        double dist = mv.getDist100Pixel();
    52         zoomFactor = 1/dist;
     51        double zoomFactor = 1/dist;
    5352
    5453        zm.setText(java.lang.Long.toString(Math.round(dist*100)/100));
  • trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java

    r6245 r6267  
    5252    private MultiMap<Layer, Layer> dependencies;
    5353
    54     private boolean zipRequired;
    55 
    5654    /**
    5755     * Constructs a new {@code SessionSaveAsAction}.
     
    7270        if (dlg.getValue() != 1) return;
    7371
    74         zipRequired = false;
     72        boolean zipRequired = false;
    7573        for (Layer l : layers) {
    7674            SessionLayerExporter ex = exporters.get(l);
  • trunk/src/org/openstreetmap/josm/actions/upload/RelationUploadOrderHook.java

    r6084 r6267  
    3232 */
    3333public class RelationUploadOrderHook implements UploadHook {
    34 
    35     /** the data to be analyzed */
    36     private APIDataSet data;
    3734
    3835    /**
     
    9996    @Override
    10097    public boolean checkUpload(APIDataSet apiDataSet) {
    101         this.data = apiDataSet;
    10298        try {
    103             data.adjustRelationUploadOrder();
     99            apiDataSet.adjustRelationUploadOrder();
    104100            return true;
    105101        } catch(CyclicUploadDependencyException e) {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r6135 r6267  
    6363public class NTV2GridShiftFile implements Serializable {
    6464
    65     private String overviewHeaderCountId;
    6665    private int overviewHeaderCount;
    6766    private int subGridHeaderCount;
     
    104103        topLevelSubGrid = null;
    105104        in.read(b8);
    106         overviewHeaderCountId = new String(b8);
     105        String overviewHeaderCountId = new String(b8);
    107106        if (!"NUM_OREC".equals(overviewHeaderCountId))
    108107            throw new IllegalArgumentException("Input file is not an NTv2 grid shift file");
  • trunk/src/org/openstreetmap/josm/gui/JMultilineLabel.java

    r3083 r6267  
    2020public class JMultilineLabel extends JLabel {
    2121    private int maxWidth = Integer.MAX_VALUE;
    22     private Dimension superPreferred = null;
    2322    private Rectangle oldbounds = null;
    2423    private Dimension oldPreferred = null;
     
    5756     */
    5857    @Override
    59     public Dimension getPreferredSize()
    60     {
     58    public Dimension getPreferredSize() {
    6159        // Without this check it will result in an infinite loop calling
    6260        // getPreferredSize. Remember the old bounds and only recalculate if
    6361        // the size actually changed.
    64         if(this.getBounds().equals(oldbounds) && oldPreferred != null)
     62        if (this.getBounds().equals(oldbounds) && oldPreferred != null) {
    6563            return oldPreferred;
     64        }
    6665        oldbounds = this.getBounds();
    6766
    68         this.superPreferred = super.getPreferredSize();
     67        Dimension superPreferred = super.getPreferredSize();
    6968        // Make it not larger than required
    7069        int width = Math.min(superPreferred.width, maxWidth);
     
    7372        final View v = (View) super.getClientProperty(BasicHTML.propertyKey);
    7473
    75         if(v == null)
     74        if (v == null) {
    7675            return superPreferred;
     76        }
    7777
    7878        v.setSize(width, 0);
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r6246 r6267  
    144144    private final DialogsPanel dialogsPanel;
    145145
    146     private final boolean unregisterTab;
    147 
    148146    /**
    149147     * Default width of the toggle dialog area.
     
    239237        MapView.addLayerChangeListener(this);
    240238
    241         unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null;
     239        boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null;
    242240        if (unregisterTab) {
    243241            for (JComponent c: allDialogButtons) c.setFocusTraversalKeysEnabled(false);
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r6265 r6267  
    146146    public final BackgroundProgressMonitor progressMonitor = new BackgroundProgressMonitor();
    147147
    148     private final MouseListener jumpToOnLeftClick;
    149148    private final SoMChangeListener somListener;
    150149
     
    709708
    710709        // also show Jump To dialog on mouse click (except context menu)
    711         jumpToOnLeftClick = new MouseAdapter() {
     710        MouseListener jumpToOnLeftClick = new MouseAdapter() {
    712711            @Override
    713712            public void mouseClicked(MouseEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r6264 r6267  
    3737public class SplashScreen extends JFrame {
    3838
    39     private SplashScreenProgressRenderer progressRenderer;
    4039    private SwingRenderingProgressMonitor progressMonitor;
    4140
     
    8988
    9089        // Add a status message
    91         progressRenderer = new SplashScreenProgressRenderer();
     90        SplashScreenProgressRenderer progressRenderer = new SplashScreenProgressRenderer();
    9291        gbc.gridy = 3;
    9392        gbc.insets = new Insets(0, 0, 10, 0);
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r6147 r6267  
    7575    private AdjustmentSynchronizer adjustmentSynchronizer;
    7676
    77     private  JCheckBox cbLockMyScrolling;
    78     private  JCheckBox cbLockMergedScrolling;
    79     private  JCheckBox cbLockTheirScrolling;
    80 
    8177    private  JLabel lblMyVersion;
    8278    private  JLabel lblMergedVersion;
     
    307303        gc.weighty = 0.0;
    308304        gc.insets = new Insets(0,0,0,0);
    309         cbLockMyScrolling = new JCheckBox();
     305        JCheckBox cbLockMyScrolling = new JCheckBox();
    310306        cbLockMyScrolling.setName("checkbox.lockmyscrolling");
    311307        add(buildAdjustmentLockControlPanel(cbLockMyScrolling), gc);
     
    313309        gc.gridx = 2;
    314310        gc.gridy = 1;
    315         cbLockMergedScrolling = new JCheckBox();
     311        JCheckBox cbLockMergedScrolling = new JCheckBox();
    316312        cbLockMergedScrolling.setName("checkbox.lockmergedscrolling");
    317313        add(buildAdjustmentLockControlPanel(cbLockMergedScrolling), gc);
     
    319315        gc.gridx = 4;
    320316        gc.gridy = 1;
    321         cbLockTheirScrolling = new JCheckBox();
     317        JCheckBox cbLockTheirScrolling = new JCheckBox();
    322318        cbLockTheirScrolling.setName("checkbox.locktheirscrolling");
    323319        add(buildAdjustmentLockControlPanel(cbLockTheirScrolling), gc);
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java

    r6264 r6267  
    3737    private static DecimalFormat COORD_FORMATTER = new DecimalFormat("###0.0000000");
    3838
    39     private  JLabel lblMyVersion;
    40     private  JLabel lblMergedVersion;
    41     private  JLabel lblTheirVersion;
    42 
    4339    private JLabel lblMyCoordinates;
    4440    private JLabel lblMergedCoordinates;
     
    7571        gc.weighty = 0.0;
    7672        gc.insets = new Insets(10,0,10,0);
    77         lblMyVersion = new JLabel(tr("My version"));
     73        JLabel lblMyVersion = new JLabel(tr("My version"));
    7874        lblMyVersion.setToolTipText(tr("Properties in my dataset, i.e. the local dataset"));
    7975        add(lblMyVersion, gc);
     
    8177        gc.gridx = 3;
    8278        gc.gridy = 0;
    83         lblMergedVersion = new JLabel(tr("Merged version"));
     79        JLabel lblMergedVersion = new JLabel(tr("Merged version"));
    8480        lblMergedVersion.setToolTipText(tr("Properties in the merged element. They will replace properties in my elements when merge decisions are applied."));
    8581        add(lblMergedVersion, gc);
     
    8783        gc.gridx = 5;
    8884        gc.gridy = 0;
    89         lblTheirVersion = new JLabel(tr("Their version"));
     85        JLabel lblTheirVersion = new JLabel(tr("Their version"));
    9086        lblTheirVersion.setToolTipText(tr("Properties in their dataset, i.e. the server dataset"));
    9187        add(lblTheirVersion, gc);
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java

    r6085 r6267  
    4141    private JTable theirTable;
    4242    private final TagMergeModel model;
    43     private JButton btnKeepMine;
    44     private JButton btnKeepTheir;
    4543    AdjustmentSynchronizer adjustmentSynchronizer;
    4644
     
    173171        KeepMineAction keepMineAction = new KeepMineAction();
    174172        mineTable.getSelectionModel().addListSelectionListener(keepMineAction);
    175         btnKeepMine = new JButton(keepMineAction);
     173        JButton btnKeepMine = new JButton(keepMineAction);
    176174        btnKeepMine.setName("button.keepmine");
    177175        add(btnKeepMine, gc);
     
    196194        gc.weighty = 0.0;
    197195        KeepTheirAction keepTheirAction = new KeepTheirAction();
    198         btnKeepTheir = new JButton(keepTheirAction);
     196        JButton btnKeepTheir = new JButton(keepTheirAction);
    199197        btnKeepTheir.setName("button.keeptheir");
    200198        add(btnKeepTheir, gc);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java

    r6084 r6267  
    8181    // the actions
    8282    private SelectObjectsAction selectObjectsAction;
    83     private  ReadChangesetsAction readChangesetAction;
     83    private ReadChangesetsAction readChangesetAction;
    8484    private ShowChangesetInfoAction showChangesetInfoAction;
    8585    private CloseOpenChangesetsAction closeChangesetAction;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java

    r6084 r6267  
    5959    private JTable userTable;
    6060    private FilterTableModel filterModel = new FilterTableModel();
    61     private SideButton addButton;
    62     private SideButton editButton;
    63     private SideButton deleteButton;
    64     private SideButton upButton;
    65     private SideButton downButton;
    6661
    6762    private EnableFilterAction enableFilterAction;
    6863    private HidingFilterAction hidingFilterAction;
    6964
    70     public FilterDialog(){
     65    /**
     66     * Constructs a new {@code FilterDialog}
     67     */
     68    public FilterDialog() {
    7169        super(tr("Filter"), "filter", tr("Filter objects and hide/disable them."),
    7270                Shortcut.registerShortcut("subwindow:filter", tr("Toggle: {0}", tr("Filter")),
     
    140138        userTable.setDefaultRenderer(String.class, new StringRenderer());
    141139
    142         addButton = new SideButton(new AbstractAction() {
     140        SideButton addButton = new SideButton(new AbstractAction() {
    143141            {
    144142                putValue(NAME, tr("Add"));
     
    153151                }
    154152            }});
    155         editButton = new SideButton(new AbstractAction() {
     153        SideButton editButton = new SideButton(new AbstractAction() {
    156154            {
    157155                putValue(NAME, tr("Edit"));
     
    170168            }
    171169        });
    172         deleteButton = new SideButton(new AbstractAction() {
     170        SideButton deleteButton = new SideButton(new AbstractAction() {
    173171            {
    174172                putValue(NAME, tr("Delete"));
     
    183181            }
    184182        });
    185         upButton = new SideButton(new AbstractAction() {
     183        SideButton upButton = new SideButton(new AbstractAction() {
    186184            {
    187185                putValue(NAME, tr("Up"));
     
    198196
    199197        });
    200         downButton = new SideButton(new AbstractAction() {
     198        SideButton downButton = new SideButton(new AbstractAction() {
    201199            {
    202200                putValue(NAME, tr("Down"));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java

    r5886 r6267  
    6161    protected List<OsmPrimitive> primitives;
    6262    protected OsmDataLayer layer;
    63     private JosmTextArea txtData;
    6463    private JosmTextArea txtMappaint;
    6564    boolean mappaintTabLoaded;
     
    9493    protected JPanel buildDataPanel() {
    9594        JPanel p = new JPanel(new GridBagLayout());
    96         txtData = new JosmTextArea();
     95        JosmTextArea txtData = new JosmTextArea();
    9796        txtData.setFont(new Font("Monospaced", txtData.getFont().getStyle(), txtData.getFont().getSize()));
    9897        txtData.setEditable(false);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java

    r6084 r6267  
    6363    private ChangesetContentTableModel model;
    6464    private Changeset currentChangeset;
    65     private JTable tblContent;
    6665
    6766    private DonwloadChangesetContentAction actDownloadContentAction;
     
    103102    protected JPanel buildContentPanel() {
    104103        JPanel pnl = new JPanel(new BorderLayout());
    105         tblContent = new JTable(
     104        JTable tblContent = new JTable(
    106105                model,
    107106                new ChangesetContentTableColumnModel(),
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanel.java

    r6084 r6267  
    2020public class ChangesetTagsPanel extends JPanel implements PropertyChangeListener{
    2121
    22     private TagTable tblTags;
    2322    private TagEditorModel model;
    2423
     
    2726        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    2827        model = new TagEditorModel();
    29         tblTags = new TagTable(model);
     28        TagTable tblTags = new TagTable(model);
    3029        tblTags.setEnabled(false);
    3130        add(new JScrollPane(tblTags), BorderLayout.CENTER);
    3231    }
    3332
     33    /**
     34     * Constructs a new {@code ChangesetTagsPanel}.
     35     */
    3436    public ChangesetTagsPanel() {
    3537        build();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java

    r6248 r6267  
    4141    }
    4242
    43     private ButtonGroup bgQueries;
    4443    private Map<BasicQuery, JRadioButton> rbQueries;
    4544    private Map<BasicQuery, JMultilineLabel> lblQueries;
    4645    private JCheckBox cbMyChangesetsOnly;
    47     private HtmlPanel pnlInfos;
    48 
    4946
    5047    protected JPanel buildQueriesPanel() {
    5148        JPanel pnl = new JPanel(new GridBagLayout());
    5249
    53         bgQueries = new ButtonGroup();
     50        ButtonGroup bgQueries = new ButtonGroup();
    5451        rbQueries = new HashMap<BasicQuery, JRadioButton>();
    5552        lblQueries = new HashMap<BasicQuery, JMultilineLabel>();
     
    123120
    124121    protected JPanel buildInfoPanel() {
    125         pnlInfos = new HtmlPanel();
     122        HtmlPanel pnlInfos = new HtmlPanel();
    126123        pnlInfos.setText(tr("<html>Please select one the following <strong>standard queries</strong>."
    127124                + "Select <strong>Download my changesets only</strong>"
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java

    r5440 r6267  
    3131    private CoordinateInfoViewer coordinateInfoViewer;
    3232    private JTabbedPane tpViewers;
    33     private VersionTable versionTable;
    3433
    3534    /**
     
    5554        pnl.setLayout(new BorderLayout());
    5655
    57         versionTable = new VersionTable(model);
     56        VersionTable versionTable = new VersionTable(model);
    5857        pnl.add(embeddInScrollPane(versionTable), BorderLayout.CENTER);
    5958        return pnl;
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r6084 r6267  
    3939    private UrlLabel lblUser;
    4040    private UrlLabel lblChangeset;
    41     private JPanel pnlUserAndChangeset;
    4241
    4342    protected void build() {
     
    4544        pnl1.setLayout(new BorderLayout());
    4645        lblInfo = new JMultilineLabel("");
    47         //lblInfo.setHorizontalAlignment(JLabel.LEFT);
    4846        pnl1.add(lblInfo, BorderLayout.CENTER);
    4947
    50         pnlUserAndChangeset = new JPanel();
     48        JPanel pnlUserAndChangeset = new JPanel();
    5149        pnlUserAndChangeset.setLayout(new GridLayout(2,2));
    5250        lblUser = new UrlLabel("", 2);
  • trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java

    r6084 r6267  
    5151    public final static String CLOSE_CHANGESET_AFTER_UPLOAD = ChangesetManagementPanel.class.getName() + ".closeChangesetAfterUpload";
    5252
    53     private ButtonGroup bgUseNewOrExisting;
    5453    private JRadioButton rbUseNew;
    5554    private JRadioButton rbExisting;
    5655    private JosmComboBox cbOpenChangesets;
    57     private JButton btnRefresh;
    58     private JButton btnClose;
    5956    private JCheckBox cbCloseAfterUpload;
    6057    private OpenChangesetComboBoxModel model;
     
    6966        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
    7067
    71         bgUseNewOrExisting = new ButtonGroup();
     68        ButtonGroup bgUseNewOrExisting = new ButtonGroup();
    7269
    7370        gc.gridwidth = 4;
     
    125122        gc.gridwidth = 1;
    126123        gc.weightx = 0.0;
    127         btnRefresh = new JButton(new RefreshAction());
     124        JButton btnRefresh = new JButton(new RefreshAction());
    128125        btnRefresh.setMargin(new Insets(0,0,0,0));
    129126        add(btnRefresh, gc);
     
    133130        gc.gridwidth = 1;
    134131        CloseChangesetAction closeChangesetAction = new CloseChangesetAction();
    135         btnClose = new JButton(closeChangesetAction);
     132        JButton btnClose = new JButton(closeChangesetAction);
    136133        btnClose.setMargin(new Insets(0,0,0,0));
    137134        cbOpenChangesets.addItemListener(closeChangesetAction);
  • trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java

    r6101 r6267  
    5151    private static final Color BG_COLOR_ERROR = new Color(255,224,224);
    5252
    53     private ButtonGroup bgStrategies;
    54     private ButtonGroup bgMultiChangesetPolicies;
    5553    private Map<UploadStrategy, JRadioButton> rbStrategy;
    5654    private Map<UploadStrategy, JLabel> lblNumRequests;
     
    6462    private long numUploadedObjects = 0;
    6563
     64    /**
     65     * Constructs a new {@code UploadStrategySelectionPanel}.
     66     */
    6667    public UploadStrategySelectionPanel() {
    6768        build();
     
    7172        JPanel pnl = new JPanel();
    7273        pnl.setLayout(new GridBagLayout());
    73         bgStrategies = new ButtonGroup();
     74        ButtonGroup bgStrategies = new ButtonGroup();
    7475        rbStrategy = new HashMap<UploadStrategy, JRadioButton>();
    7576        lblStrategies = new HashMap<UploadStrategy, JMultilineLabel>();
     
    193194        pnlMultiChangesetPolicyPanel.add(rbUseMultipleChangesets = new JRadioButton(tr("Open and use as many new changesets as necessary")),gc);
    194195
    195         bgMultiChangesetPolicies = new ButtonGroup();
     196        ButtonGroup bgMultiChangesetPolicies = new ButtonGroup();
    196197        bgMultiChangesetPolicies.add(rbFillOneChangeset);
    197198        bgMultiChangesetPolicies.add(rbUseMultipleChangesets);
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r6264 r6267  
    148148    private final List<Grabber> grabbers = new ArrayList<Grabber>();
    149149    private final List<Thread> grabberThreads = new ArrayList<Thread>();
    150     private int threadCount;
    151     private int workingThreadCount;
    152150    private boolean canceled;
    153151
     
    569567        requestQueueLock.lock();
    570568        try {
    571             workingThreadCount--;
    572 
    573569            sortRequests(localOnly);
    574570            while (!canceled && (requestQueue.isEmpty() || (localOnly && !requestQueue.get(0).hasExactMatch()))) {
     
    581577            }
    582578
    583             workingThreadCount++;
    584579            if (canceled)
    585580                return null;
     
    958953                grabberThreads.add(t);
    959954            }
    960             this.workingThreadCount = grabbers.size();
    961             this.threadCount = grabbers.size();
    962955        } finally {
    963956            requestQueueLock.unlock();
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java

    r5886 r6267  
    2323    private JosmTextField tfUserName;
    2424    private JosmPasswordField tfPassword;
    25     private UserNameValidator valUserName;
    2625
    2726    private JCheckBox cbWriteMapData;
     
    4443        pnl.add(tfUserName = new JosmTextField(), gc);
    4544        SelectAllOnFocusGainedDecorator.decorate(tfUserName);
    46         valUserName = new UserNameValidator(tfUserName);
     45        UserNameValidator valUserName = new UserNameValidator(tfUserName);
    4746        valUserName.validate();
    4847
  • trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java

    r6084 r6267  
    5656 */
    5757public class OAuthAuthorizationWizard extends JDialog {
    58     private HtmlPanel pnlMessage;
    5958    private boolean canceled;
    6059    private final String apiUrl;
     
    109108        gc.gridy  = 1;
    110109        gc.insets = new Insets(5,0,0,5);
    111         pnlMessage = new HtmlPanel();
     110        HtmlPanel pnlMessage = new HtmlPanel();
    112111        pnlMessage.setText("<html><body>"
    113112                + tr("With OAuth you grant JOSM the right to upload map data and GPS tracks "
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java

    r6084 r6267  
    5252    private JCheckBox largeGpsPoints = new JCheckBox(tr("Draw large GPS points"));
    5353    private JCheckBox hdopCircleGpsPoints = new JCheckBox(tr("Draw a circle from HDOP value"));
    54     private ButtonGroup colorGroup;
    5554    private JRadioButton colorTypeVelocity = new JRadioButton(tr("Velocity (red = slow, green = fast)"));
    5655    private JRadioButton colorTypeDirection = new JRadioButton(tr("Direction (red = west, yellow = north, green = east, blue = south)"));
     
    207206
    208207        // colorTracks
    209         colorGroup = new ButtonGroup();
     208        ButtonGroup colorGroup = new ButtonGroup();
    210209        if (layerName!=null) {
    211210            colorGroup.add(colorTypeGlobal);
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java

    r6084 r6267  
    5555    }
    5656
    57     private ButtonGroup bgVersionBasedUpdatePolicy;
    58     private ButtonGroup bgTimeBasedUpdatePolicy;
    5957    private Map<Policy, JRadioButton> rbVersionBasedUpatePolicy;
    6058    private Map<Policy, JRadioButton> rbTimeBasedUpatePolicy;
     
    6967        gc.weightx  =1.0;
    7068
    71         bgVersionBasedUpdatePolicy = new ButtonGroup();
     69        ButtonGroup bgVersionBasedUpdatePolicy = new ButtonGroup();
    7270        rbVersionBasedUpatePolicy = new HashMap<Policy, JRadioButton>();
    7371        JRadioButton btn = new JRadioButton(tr("Ask before updating"));
     
    110108        TimeBasedPolicyChangeListener changeListener = new TimeBasedPolicyChangeListener();
    111109
    112         bgTimeBasedUpdatePolicy = new ButtonGroup();
     110        ButtonGroup bgTimeBasedUpdatePolicy = new ButtonGroup();
    113111        rbTimeBasedUpatePolicy = new HashMap<Policy, JRadioButton>();
    114112        JRadioButton btn = new JRadioButton(tr("Ask before updating"));
     
    157155    }
    158156
     157    /**
     158     * Constructs a new {@code PluginUpdatePolicyPanel}.
     159     */
    159160    public PluginUpdatePolicyPanel() {
    160161        build();
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/BasicAuthenticationPreferencesPanel.java

    r6248 r6267  
    3333    /** the OSM user name */
    3434    private JosmTextField tfOsmUserName;
    35     private UserNameValidator valUserName;
    3635    /** the OSM password */
    3736    private JosmPasswordField tfOsmPassword;
     
    5857        add(tfOsmUserName = new JosmTextField(), gc);
    5958        SelectAllOnFocusGainedDecorator.decorate(tfOsmUserName);
    60         valUserName = new UserNameValidator(tfOsmUserName);
     59        UserNameValidator valUserName = new UserNameValidator(tfOsmUserName);
    6160        valUserName.validate();
    6261
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java

    r6248 r6267  
    7272    public static final String PROXY_PASS = "proxy.pass";
    7373
    74     private ButtonGroup bgProxyPolicy;
    7574    private Map<ProxyPolicy, JRadioButton> rbProxyPolicy;
    7675    private JosmTextField tfProxyHttpHost;
     
    209208        GridBagConstraints gc = new GridBagConstraints();
    210209
    211         bgProxyPolicy = new ButtonGroup();
     210        ButtonGroup bgProxyPolicy = new ButtonGroup();
    212211        rbProxyPolicy = new HashMap<ProxyPolicy, JRadioButton>();
    213212        ProxyPolicyChangeListener policyChangeListener = new ProxyPolicyChangeListener();
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java

    r6092 r6267  
    4343
    4444    private AutoCompletionManager autocomplete;
    45     private AutoCompletionList acList;
    4645
    4746    /**
     
    185184
    186185        autocomplete = layer.data.getAutoCompletionManager();
    187         acList = new AutoCompletionList();
     186        AutoCompletionList acList = new AutoCompletionList();
    188187
    189188        TagCellEditor editor = ((TagCellEditor) tagTable.getColumnModel().getColumn(0).getCellEditor());
  • trunk/src/org/openstreetmap/josm/tools/UrlLabel.java

    r6101 r6267  
    1818    private String url = "";
    1919    private String description = "";
    20     private int fontPlus;
    2120
     21    /**
     22     * Constructs a new {@code UrlLabel}.
     23     */
    2224    public UrlLabel() {
    2325        addMouseListener(this);
     
    4143        setUrl(url);
    4244        setDescription(description);
    43         this.fontPlus = fontPlus;
    44         if (fontPlus!=0) setFont(getFont().deriveFont(0, getFont().getSize()+fontPlus));
     45        if (fontPlus!=0) {
     46            setFont(getFont().deriveFont(0, getFont().getSize()+fontPlus));
     47        }
    4548        refresh();
    4649    }
Note: See TracChangeset for help on using the changeset viewer.