Ignore:
Timestamp:
2015-04-28T00:49:49+02:00 (9 years ago)
Author:
Don-vip
Message:

fix sonar squid:S2039 - Member variable visibility should be specified

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
13 edited

Legend:

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

    r7509 r8285  
    5858
    5959    public static class PolarCoor {
    60         double radius;
    61         double angle;
    62         EastNorth origin = new EastNorth(0, 0);
    63         double azimuth = 0;
     60        private double radius;
     61        private double angle;
     62        private EastNorth origin = new EastNorth(0, 0);
     63        private double azimuth = 0;
    6464
    6565        PolarCoor(double radius, double angle) {
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r7269 r8285  
    9898     */
    9999    private static class PolarNode {
    100         double a;
    101         Node node;
     100        private double a;
     101        private Node node;
    102102
    103103        PolarNode(EastNorth center, Node n) {
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r7433 r8285  
    7070
    7171    protected OsmDataLayer layer;
    72     JCheckBox cbClearUndoRedo;
     72    protected JCheckBox cbClearUndoRedo;
    7373
    7474    protected Set<OsmPrimitive> toPurge;
  • trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java

    r7937 r8285  
    2121     * outer endpoints of selected ways
    2222     */
    23     Set<Node> outerNodes;
     23    private Set<Node> outerNodes;
    2424    /**
    2525     * endpoints of selected ways
    2626     */
    27     Set<Node> nodes;
     27    private Set<Node> nodes;
    2828
    2929    /**
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmCompressedTask.java

    r7937 r8285  
    22package org.openstreetmap.josm.actions.downloadtasks;
    33
     4import static org.openstreetmap.josm.tools.I18n.tr;
     5
    46import java.util.concurrent.Future;
    5 
    6 import static org.openstreetmap.josm.tools.I18n.tr;
    77
    88import org.openstreetmap.josm.Main;
     
    1919public class DownloadOsmCompressedTask extends DownloadOsmTask {
    2020
    21     static final String PATTERN_COMPRESS =  "https?://.*/.*\\.osm.(gz|bz2?|zip)";
     21    private static final String PATTERN_COMPRESS =  "https?://.*/.*\\.osm.(gz|bz2?|zip)";
    2222
    2323    @Override
     
    3030        return tr("Download Compressed OSM");
    3131    }
    32    
     32
    3333    @Override
    3434    public Future<?> download(boolean newLayer, Bounds downloadArea,
     
    3636        return null;
    3737    }
    38    
     38
    3939    /**
    4040     * Loads a given URL
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java

    r7668 r8285  
    8282
    8383    private static class DeleteParameters {
    84         DeleteMode mode;
    85         Node nearestNode;
    86         WaySegment nearestSegment;
     84        private DeleteMode mode;
     85        private Node nearestNode;
     86        private WaySegment nearestSegment;
    8787    }
    8888
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r8064 r8285  
    12861286
    12871287    private class SnapHelper {
    1288         boolean snapOn; // snapping is turned on
     1288        private boolean snapOn; // snapping is turned on
    12891289
    12901290        private boolean active; // snapping is active for current mouse position
     
    12981298        private boolean snapToProjections;
    12991299
    1300         EastNorth dir2;
    1301         EastNorth projected;
    1302         String labelText;
    1303         double lastAngle;
    1304 
    1305         double customBaseHeading=-1; // angle of base line, if not last segment)
     1300        private EastNorth dir2;
     1301        private EastNorth projected;
     1302        private String labelText;
     1303        private double lastAngle;
     1304
     1305        private double customBaseHeading=-1; // angle of base line, if not last segment)
    13061306        private EastNorth segmentPoint1; // remembered first point of base segment
    13071307        private EastNorth segmentPoint2; // remembered second point of base segment
    13081308        private EastNorth projectionSource; // point that we are projecting to the line
    13091309
    1310         double[] snapAngles;
    1311         double snapAngleTolerance;
    1312 
    1313         double pe,pn; // (pe,pn) - direction of snapping line
    1314         double e0,n0; // (e0,n0) - origin of snapping line
    1315 
    1316         final String fixFmt="%d "+tr("FIX");
    1317         Color snapHelperColor;
     1310        private double[] snapAngles;
     1311        private double snapAngleTolerance;
     1312
     1313        private double pe,pn; // (pe,pn) - direction of snapping line
     1314        private double e0,n0; // (e0,n0) - origin of snapping line
     1315
     1316        private final String fixFmt="%d "+tr("FIX");
     1317        private Color snapHelperColor;
    13181318        private Color highlightColor;
    13191319
     
    13221322        private Stroke highlightStroke;
    13231323
    1324         JCheckBoxMenuItem checkBox;
     1324        private JCheckBoxMenuItem checkBox;
    13251325        public final Color ORANGE_TRANSPARENT = new Color(Color.ORANGE.getRed(),Color.ORANGE.getGreen(),Color.ORANGE.getBlue(),128);
    13261326
     
    16721672        }
    16731673
    1674         MouseListener anglePopupListener = new PopupMenuLauncher( new JPopupMenu() {
    1675             JCheckBoxMenuItem repeatedCb = new JCheckBoxMenuItem(new AbstractAction(tr("Toggle snapping by {0}", getShortcut().getKeyText())){
     1674        private MouseListener anglePopupListener = new PopupMenuLauncher(new JPopupMenu() {
     1675            private JCheckBoxMenuItem repeatedCb = new JCheckBoxMenuItem(
     1676                    new AbstractAction(tr("Toggle snapping by {0}", getShortcut().getKeyText())) {
    16761677                @Override public void actionPerformed(ActionEvent e) {
    16771678                    boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
     
    16801681                }
    16811682            });
    1682             JCheckBoxMenuItem helperCb = new JCheckBoxMenuItem(new AbstractAction(tr("Show helper geometry")){
     1683            private JCheckBoxMenuItem helperCb = new JCheckBoxMenuItem(
     1684                    new AbstractAction(tr("Show helper geometry")) {
    16831685                @Override public void actionPerformed(ActionEvent e) {
    16841686                    boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
     
    16901692                }
    16911693            });
    1692             JCheckBoxMenuItem projectionCb = new JCheckBoxMenuItem(new AbstractAction(tr("Snap to node projections")){
     1694            private JCheckBoxMenuItem projectionCb = new JCheckBoxMenuItem(
     1695                    new AbstractAction(tr("Snap to node projections")) {
    16931696                @Override public void actionPerformed(ActionEvent e) {
    16941697                    boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r7217 r8285  
    2121import org.openstreetmap.josm.Main;
    2222import org.openstreetmap.josm.data.Bounds;
    23 import org.openstreetmap.josm.data.SystemOfMeasurement;
    2423import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
    2524import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
     25import org.openstreetmap.josm.data.SystemOfMeasurement;
    2626import org.openstreetmap.josm.data.coor.EastNorth;
    2727import org.openstreetmap.josm.data.osm.Node;
     
    124124    private EastNorth helperLineEnd;
    125125
    126     Stroke helpLineStroke;
    127     Stroke refLineStroke;
    128     Color mainColor;
    129 
     126    private Stroke helpLineStroke;
     127    private Stroke refLineStroke;
     128    private Color mainColor;
     129
     130    /**
     131     * Constructs a new {@code ParallelWayAction}.
     132     * @param mapFrame Map frame
     133     */
    130134    public ParallelWayAction(MapFrame mapFrame) {
    131135        super(tr("Parallel"), "parallel", tr("Make parallel copies of ways"),
     
    303307
    304308        // Since the created way is left selected, we need to unselect again here
    305         if (pWays != null && pWays.ways != null) {
    306             getCurrentDataSet().clearSelection(pWays.ways);
     309        if (pWays != null && pWays.getWays() != null) {
     310            getCurrentDataSet().clearSelection(pWays.getWays());
    307311            pWays = null;
    308312        }
     
    545549            pWays = new ParallelWays(sourceWays, copyTags, referenceWayIndex);
    546550            pWays.commit();
    547             getCurrentDataSet().setSelected(pWays.ways);
     551            getCurrentDataSet().setSelected(pWays.getWays());
    548552            return true;
    549553        } catch (IllegalArgumentException e) {
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java

    r7025 r8285  
    2626 */
    2727public class ParallelWays {
    28     final List<Way> ways;
     28    private final List<Way> ways;
    2929    private final List<Node> sortedNodes;
    3030
     
    195195        }
    196196    }
     197
     198    public final List<Way> getWays() {
     199        return ways;
     200    }
    197201}
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r8061 r8285  
    137137     * point where user pressed the mouse to start movement
    138138     */
    139     EastNorth startEN;
     139    private EastNorth startEN;
    140140    /**
    141141     * The last known position of the mouse.
     
    215215        removeHighlighting();
    216216    }
    217 
    218     int previousModifiers;
    219217
    220218    @Override
     
    949947    }
    950948
    951     CycleManager cycleManager = new CycleManager();
    952     VirtualManager virtualManager = new VirtualManager();
     949    private CycleManager cycleManager = new CycleManager();
     950    private VirtualManager virtualManager = new VirtualManager();
    953951
    954952    private class CycleManager {
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r8250 r8285  
    99import java.awt.Dimension;
    1010import java.awt.FlowLayout;
    11 import java.awt.Font;
    1211import java.awt.GridBagLayout;
    1312import java.awt.event.ActionEvent;
     
    154153    private static class DescriptionTextBuilder {
    155154
    156         StringBuilder s = new StringBuilder(4096);
     155        private final StringBuilder s = new StringBuilder(4096);
    157156
    158157        public StringBuilder append(String string) {
  • trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java

    r8179 r8285  
    107107    public static class FixDataKey implements FixData {
    108108        /** key of wrong data */
    109         String oldKey;
     109        private String oldKey;
    110110        /** key of correct data */
    111         String newKey;
     111        private String newKey;
    112112
    113113        /**
     
    141141    public static class FixDataTag implements FixData {
    142142        /** key of wrong data */
    143         String oldKey;
     143        private String oldKey;
    144144        /** value of wrong data */
    145         String oldValue;
     145        private String oldValue;
    146146        /** key of correct data */
    147         String newKey;
     147        private String newKey;
    148148        /** value of correct data */
    149         String newValue;
     149        private String newValue;
    150150
    151151        /**
  • trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java

    r7937 r8285  
    4242
    4343        private boolean isCanceled = false;
    44         Map<Note, Note> updatedNotes = new HashMap<>();
    45         Map<Note, Exception> failedNotes = new HashMap<>();
     44        private Map<Note, Note> updatedNotes = new HashMap<>();
     45        private Map<Note, Exception> failedNotes = new HashMap<>();
    4646
    4747        /**
Note: See TracChangeset for help on using the changeset viewer.