Changeset 7509 in josm


Ignore:
Timestamp:
2014-09-07T16:33:52+02:00 (5 years ago)
Author:
stoecker
Message:

remove tabs

Location:
trunk/src
Files:
96 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/JOSM.java

    r5829 r7509  
    44/**
    55 * JOSM main class (entry point of the application).<br/>
    6  * 
     6 *
    77 * The name of the main class will be the name of the application menu on OS X.
    88 * so instead of exposing "org.openstreetmap.josm.gui.MainApplication" to the
     
    1010 * An alternative would be to set the name in the plist file---but JOSM usually
    1111 * is not delivered as an OS X Application Bundle, so we have no plist file.
    12  * 
     12 *
    1313 * @since 1023
    1414 */
  • trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java

    r7017 r7509  
    3131
    3232/**
    33  * Action displayed in imagery menu to add a new imagery layer. 
     33 * Action displayed in imagery menu to add a new imagery layer.
    3434 * @since 3715
    3535 */
  • trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java

    r7005 r7509  
    101101    }
    102102
    103    
     103
    104104    /**
    105105     * Perform AlignInCircle action.
     
    137137        EastNorth center = null;
    138138        double radius = 0;
    139        
     139
    140140        for (OsmPrimitive osm : sel) {
    141141            if (osm instanceof Node) {
     
    163163            ArrayList<Node> inside = new ArrayList<>();
    164164            ArrayList<Node> outside = new ArrayList<>();
    165            
     165
    166166            for(Node n: nodes) {
    167167                boolean isInside = false;
     
    177177                    outside.add(n);
    178178            }
    179            
     179
    180180            if(outside.size() == 1 && inside.isEmpty()) {
    181181                center = outside.get(0).getEastNorth();
     
    190190                radius = distance(en0, en1) / 2;
    191191            }
    192            
     192
    193193            fixNodes.addAll(inside);
    194194            fixNodes.addAll(collectNodesWithExternReferers(ways));
     
    227227            }
    228228        }
    229    
     229
    230230        // Now calculate the average distance to each node from the
    231231        // center. This method is ok as long as distances are short
     
    243243
    244244        // Move each node to that distance from the center.
    245         // Nodes that are not "fix" will be adjust making regular arcs. 
     245        // Nodes that are not "fix" will be adjust making regular arcs.
    246246        int nodeCount = nodes.size();
    247247        // Search first fixed node
     
    276276            i = j; // Update start point for next iteration
    277277        }
    278        
     278
    279279        Main.main.undoRedo.add(new SequenceCommand(tr("Align Nodes in Circle"), cmds));
    280280        Main.map.repaint();
     
    294294        return withReferrers;
    295295    }
    296    
     296
    297297    /**
    298298     * Assuming all ways can be joined into polygon, create an ordered list of node.
     
    360360        return true;
    361361    }
    362    
     362
    363363    @Override
    364364    protected void updateEnabledState() {
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r7005 r7509  
    260260        private final Node a;
    261261        private final Node b;
    262        
     262
    263263        /**
    264264         * Constructs a new {@code NodePair}.
     
    351351            return result;
    352352        }
    353        
     353
    354354        @Override
    355355        public boolean equals(Object obj) {
  • trunk/src/org/openstreetmap/josm/actions/DownloadAction.java

    r6509 r7509  
    2626 */
    2727public class DownloadAction extends JosmAction {
    28    
     28
    2929    /**
    3030     * Constructs a new {@code DownloadAction}.
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r6964 r7509  
    2020
    2121/**
    22  * Action that merges two or more OSM data layers. 
     22 * Action that merges two or more OSM data layers.
    2323 * @since 1890
    2424 */
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r7025 r7509  
    5050 * The "surviving" node will be moved to that location if it is
    5151 * different from the last selected node.
    52  * 
     52 *
    5353 * @since 422
    5454 */
  • trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java

    r7005 r7509  
    123123            layersOut.add(layer);
    124124        }
    125        
     125
    126126        int active = -1;
    127127        Layer activeLayer = Main.map.mapView.getActiveLayer();
  • trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java

    r7005 r7509  
    3838 */
    3939public class SimplifyWayAction extends JosmAction {
    40    
     40
    4141    /**
    4242     * Constructs a new {@code SimplifyWayAction}.
  • trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java

    r7005 r7509  
    2727 */
    2828public class UnJoinNodeWayAction extends JosmAction {
    29    
     29
    3030    /**
    3131     * Constructs a new {@code UnJoinNodeWayAction}.
  • trunk/src/org/openstreetmap/josm/actions/ViewportFollowToggleAction.java

    r6336 r7509  
    1616 */
    1717public class ViewportFollowToggleAction extends ToggleAction {
    18    
     18
    1919    /**
    20      * Constructs a new {@code ViewportFollowToggleAction}. 
     20     * Constructs a new {@code ViewportFollowToggleAction}.
    2121     */
    2222    public ViewportFollowToggleAction() {
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r7299 r7509  
    155155                            String rangeA2 = rangeA[1].trim();
    156156                            // if min timestap is empty: use lowest possible date
    157                             long minDate = DateUtils.fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime(); 
     157                            long minDate = DateUtils.fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime();
    158158                            // if max timestamp is empty: use "now"
    159                             long maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.fromString(rangeA2).getTime(); 
     159                            long maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.fromString(rangeA2).getTime();
    160160                            return new TimestampRange(minDate, maxDate);
    161161                        } else {
  • trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java

    r7005 r7509  
    3838 */
    3939public class ValidateUploadHook implements UploadHook {
    40    
     40
    4141    /**
    4242     * Validate the modified data before uploading
  • trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java

    r7005 r7509  
    4545        this(Collections.singleton(object), key, newKey);
    4646    }
    47    
     47
    4848    /**
    4949     * Constructs a new {@code ChangePropertyKeyCommand}.
  • trunk/src/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommand.java

    r6887 r7509  
    7171        return true;
    7272    }
    73    
     73
    7474    private void deleteMy() {
    7575        Set<OsmPrimitive> referrers = getLayer().data.unlinkReferencesToPrimitive(conflict.getMy());
  • trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java

    r7005 r7509  
    4545
    4646        private final Class<? extends OsmPrimitive> c;
    47        
     47
    4848        public FilterPredicate(Class<? extends OsmPrimitive> c) {
    4949            this.c = c;
     
    5555        }
    5656    }
    57    
     57
    5858    private static final FilterPredicate NODE_FILTER_PREDICATE = new FilterPredicate(Node.class);
    5959    private static final FilterPredicate WAY_FILTER_PREDICATE = new FilterPredicate(Way.class);
  • trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java

    r6906 r7509  
    4343    /**
    4444     * Returns the euclidean distance from this {@code Coordinate} to a specified {@code Coordinate}.
    45      * 
     45     *
    4646     * @param coor the specified coordinate to be measured against this {@code Coordinate}
    4747     * @return the euclidean distance from this {@code Coordinate} to a specified {@code Coordinate}
     
    5151        return distance(coor.x, coor.y);
    5252    }
    53    
     53
    5454    /**
    5555     * Returns the euclidean distance from this {@code Coordinate} to a specified coordinate.
    56      * 
     56     *
    5757     * @param px the X coordinate of the specified point to be measured against this {@code Coordinate}
    5858     * @param py the Y coordinate of the specified point to be measured against this {@code Coordinate}
     
    6565        return Math.sqrt(dx*dx + dy*dy);
    6666    }
    67    
     67
    6868    /**
    6969     * Returns the square of the euclidean distance from this {@code Coordinate} to a specified {@code Coordinate}.
    70      * 
     70     *
    7171     * @param coor the specified coordinate to be measured against this {@code Coordinate}
    7272     * @return the square of the euclidean distance from this {@code Coordinate} to a specified {@code Coordinate}
     
    7979    /**
    8080     * Returns the square of euclidean distance from this {@code Coordinate} to a specified coordinate.
    81      * 
     81     *
    8282     * @param px the X coordinate of the specified point to be measured against this {@code Coordinate}
    8383     * @param py the Y coordinate of the specified point to be measured against this {@code Coordinate}
     
    9393    /**
    9494     * Converts to single point BBox.
    95      * 
     95     *
    9696     * @return single point BBox defined by this coordinate.
    9797     * @since 6203
     
    100100        return new BBox(x, y);
    101101    }
    102    
     102
    103103    /**
    104104     * Creates bbox around this coordinate. Coordinate defines
    105105     * center of bbox, its edge will be 2*r.
    106      * 
     106     *
    107107     * @param r size
    108108     * @return BBox around this coordinate
  • trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java

    r6670 r7509  
    4646    /**
    4747     * Returns the euclidean distance from this {@code EastNorth} to a specified {@code EastNorth}.
    48      * 
     48     *
    4949     * @param en the specified coordinate to be measured against this {@code EastNorth}
    5050     * @return the euclidean distance from this {@code EastNorth} to a specified {@code EastNorth}
     
    5757    /**
    5858     * Returns the square of the euclidean distance from this {@code EastNorth} to a specified {@code EastNorth}.
    59      * 
     59     *
    6060     * @param en the specified coordinate to be measured against this {@code EastNorth}
    6161     * @return the square of the euclidean distance from this {@code EastNorth} to a specified {@code EastNorth}
     
    6868    /**
    6969     * Counts length (distance from [0,0]) of this.
    70      * 
     70     *
    7171     * @return length of this
    7272     */
  • trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java

    r6380 r7509  
    33
    44public final class QuadTiling {
    5    
     5
    66    private QuadTiling() {
    77        // Hide default constructor for utils classes
    88    }
    9    
     9
    1010    public static final int NR_LEVELS = 24;
    1111    public static final double WORLD_PARTS = (1 << NR_LEVELS);
     
    4747        return new LatLon(y, x);
    4848    }
    49    
     49
    5050    static long xy2tile(long x, long y) {
    5151        long tile = 0;
     
    6161        return tile;
    6262    }
    63    
     63
    6464    static long coorToTile(LatLon coor) {
    6565        return quadTile(coor);
    6666    }
    67    
     67
    6868    static long lon2x(double lon) {
    6969        long ret = (long)((lon + 180.0) * WORLD_PARTS / 360.0);
     
    7373        return ret;
    7474    }
    75    
     75
    7676    static long lat2y(double lat) {
    7777        long ret = (long)((lat + 90.0) * WORLD_PARTS / 180.0);
     
    8181        return ret;
    8282    }
    83    
     83
    8484    public static long quadTile(LatLon coor) {
    8585        return xy2tile(lon2x(coor.lon()), lat2y(coor.lat()));
    8686    }
    87    
     87
    8888    public static int index(int level, long quad) {
    8989        long mask = 0x00000003;
     
    9191        return (int)(mask & (quad >> total_shift));
    9292    }
    93    
     93
    9494    /**
    9595     * Returns quad tiling index for given coordinates and level.
     
    102102     */
    103103    public static int index(LatLon coor, int level) {
    104         // The nodes that don't return coordinates will all get stuck in a single tile. 
     104        // The nodes that don't return coordinates will all get stuck in a single tile.
    105105        // Hopefully there are not too many of them
    106106        if (coor == null)
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java

    r7319 r7509  
    129129        return result;
    130130    }
    131    
     131
    132132    /**
    133133     * returns minimum and maximum timestamps in the track
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxTrack.java

    r6380 r7509  
    1717    Bounds getBounds();
    1818    double length();
    19    
     19
    2020    /**
    2121     *
  • trunk/src/org/openstreetmap/josm/data/imagery/Shape.java

    r7186 r7509  
    107107        return true;
    108108    }
    109    
    110    
     109
     110
    111111}
  • trunk/src/org/openstreetmap/josm/data/notes/Note.java

    r7451 r7509  
    3333    /** @return The unique OSM ID of this note */
    3434    public long getId() {
    35         return id;
     35        return id;
    3636    }
    3737
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r7237 r7509  
    635635        return keys == null ? 0 : keys.length / 2;
    636636    }
    637    
     637
    638638    @Override
    639639    public final Collection<String> keySet() {
  • trunk/src/org/openstreetmap/josm/data/osm/BBox.java

    r7193 r7509  
    1818    /**
    1919     * Constructs a new {@code BBox} defined by a single point.
    20      * 
     20     *
    2121     * @param x X coordinate
    2222     * @param y Y coordinate
     
    3232     * Constructs a new {@code BBox} defined by points <code>a</code> and <code>b</code>.
    3333     * Result is minimal BBox containing both points.
    34      * 
    35      * @param a 
     34     *
     35     * @param a
    3636     * @param b
    3737     */
     
    4242    /**
    4343     * Constructs a new {@code BBox} from another one.
    44      * 
     44     *
    4545     * @param copy the BBox to copy
    4646     */
     
    5353
    5454    public BBox(double a_x, double a_y, double b_x, double b_y)  {
    55        
     55
    5656        if (a_x > b_x) {
    5757            xmax = a_x;
     
    6161            xmin = a_x;
    6262        }
    63        
     63
    6464        if (a_y > b_y) {
    6565            ymax = a_y;
     
    6969            ymin = a_y;
    7070        }
    71        
     71
    7272        sanity();
    7373    }
     
    260260        return idx1;
    261261    }
    262    
     262
    263263    public Rectangle2D toRectangle() {
    264264        return new Rectangle2D.Double(xmin, ymin, xmax - xmin, ymax - ymin);
  • trunk/src/org/openstreetmap/josm/data/osm/FilterWorker.java

    r6362 r7509  
    1313 */
    1414public final class FilterWorker {
    15    
     15
    1616    private FilterWorker() {
    1717        // Hide default constructor for utils classes
    1818    }
    19    
     19
    2020    /**
    2121     * Apply the filters to the primitives of the data set.
  • trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java

    r7005 r7509  
    1212 */
    1313public final class TigerUtils {
    14    
     14
    1515    private TigerUtils() {
    1616        // Hide default constructor for utils classes
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r7091 r7509  
    743743        }
    744744    }
    745    
     745
    746746}
  • trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java

    r6862 r7509  
    88 */
    99public final class WaySegment implements Comparable<WaySegment> {
    10    
     10
    1111    /**
    1212     * The way.
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java

    r7053 r7509  
    128128     * to its beginning size. The larger the bounding box, the smaller the change,
    129129     * down to the minimum of 1% enlargement.
    130      * 
     130     *
    131131     * Warning: if the bounding box only contains a single node, no expansion takes
    132132     * place because a node has no width/height. Use <code>enlargeToMinDegrees</code>
    133133     * instead.
    134      * 
     134     *
    135135     * Example: You specify enlargement to be up to 100%.
    136      * 
     136     *
    137137     *          Bounding box is a small house: enlargement will be 95–100%, i.e.
    138138     *          making enough space so that the house fits twice on the screen in
    139139     *          each direction.
    140      * 
     140     *
    141141     *          Bounding box is a large landuse, like a forest: Enlargement will
    142142     *          be 1–10%, i.e. just add a little border around the landuse.
    143      * 
     143     *
    144144     * If the bounding box has not been set (<code>min</code> or <code>max</code>
    145145     * equal <code>null</code>) this method does not do anything.
    146      * 
     146     *
    147147     * @param maxEnlargePercent
    148148     */
     
    165165     * the specified size in width and height. The value is ignored if the
    166166     * bounding box is already larger than the specified amount.
    167      * 
     167     *
    168168     * If the bounding box has not been set (<code>min</code> or <code>max</code>
    169169     * equal <code>null</code>) this method does not do anything.
    170      * 
     170     *
    171171     * If the bounding box contains objects and is to be enlarged, the objects
    172172     * will be centered within the new bounding box.
    173      * 
     173     *
    174174     * @param size minimum width and height in meter
    175175     */
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r7478 r7509  
    247247     *
    248248     * This bug has only been observed on Mac OS X, see #7841.
    249      * 
     249     *
    250250     * After switch to Java 7, this test is a false positive on Mac OS X (see #10446),
    251251     * i.e. it returns true, but the real rendering code does not require any special
     
    10691069
    10701070        Rectangle bounds = g.getClipBounds();
    1071        
     1071
    10721072        Polygon poly = new Polygon();
    10731073        Point lastPoint = null;
     
    10751075        double pathLength = 0;
    10761076        long dx, dy;
    1077        
     1077
    10781078        // find half segments that are long enough to draw text on
    10791079        // (don't draw text over the cross hair in the center of each segment)
     
    10811081        List<Double> longHalfSegmentEnd = new ArrayList<>(); // end point of half segment (as length along the way)
    10821082        List<Double> longHalfsegmentQuality = new ArrayList<>(); // quality factor (off screen / partly on screen / fully on screen)
    1083        
     1083
    10841084        while (it.hasNext()) {
    10851085            Node n = it.next();
     
    11041104                    longHalfSegmentEnd.add(pathLength + segmentLength / 2);
    11051105                    longHalfsegmentQuality.add(q);
    1106                    
     1106
    11071107                    q = 0;
    11081108                    if (bounds != null) {
     
    11211121            lastPoint = p;
    11221122        }
    1123        
     1123
    11241124        if (rec.getWidth() > pathLength)
    11251125            return;
    11261126
    11271127        double t1, t2;
    1128        
     1128
    11291129        if (!longHalfSegmentStart.isEmpty()) {
    11301130            if (way.getNodesCount() == 2) {
     
    11341134                longHalfsegmentQuality.set(0, longHalfsegmentQuality.get(0) + 0.5);
    11351135            }
    1136            
     1136
    11371137            // find the long half segment that is closest to the center of the way
    11381138            // candidates with higher quality value are preferred
  • trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java

    r6135 r7509  
    2323 */
    2424public interface Proj {
    25    
     25
    2626    /**
    2727     * Replies a human readable name of this projection.
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java

    r7005 r7509  
    4141        private final List<LatLon> coor;
    4242        private final Map<String, String> keys;
    43        
     43
    4444        public WayPair(List<LatLon> coor, Map<String, String> keys) {
    4545            this.coor = coor;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java

    r7252 r7509  
    5050        /** The boolean indicating if special values must be ignored or considered only */
    5151        private final boolean ignore;
    52        
     52
    5353        /**
    5454         * Constructs a new {@code UnclosedWaysCheck}.
     
    6060            this(code, key, engMessage, Collections.<String>emptyList());
    6161        }
    62        
     62
    6363        /**
    6464         * Constructs a new {@code UnclosedWaysCheck}.
     
    7171            this(code, key, engMessage, ignoredValues, true);
    7272        }
    73        
     73
    7474        /**
    7575         * Constructs a new {@code UnclosedWaysCheck}.
     
    8787            this.ignore = ignore;
    8888        }
    89        
     89
    9090        /**
    9191         * Returns the test error of the given way, if any.
     
    106106            return null;
    107107        }
    108        
     108
    109109        protected boolean isValueErroneous(String value) {
    110110            return value != null && ignore != specialValues.contains(value);
     
    149149        new UnclosedWaysBooleanCheck(1130, "area",     marktr("area")),
    150150    };
    151    
     151
    152152    /**
    153153     * Returns the set of checked OSM keys.
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java

    r7012 r7509  
    2525 */
    2626public class UntaggedWay extends Test {
    27    
     27
    2828    /** Empty way error */
    2929    protected static final int EMPTY_WAY    = 301;
  • trunk/src/org/openstreetmap/josm/gui/MapMover.java

    r7012 r7509  
    4545                if (mouse == null)
    4646                    mouse = new Point((int)nc.getBounds().getCenterX(), (int)nc.getBounds().getCenterY());
    47                 MouseWheelEvent we = new MouseWheelEvent(nc, e.getID(), e.getWhen(), e.getModifiers(), mouse.x, mouse.y, 0, false, 
     47                MouseWheelEvent we = new MouseWheelEvent(nc, e.getID(), e.getWhen(), e.getModifiers(), mouse.x, mouse.y, 0, false,
    4848                        MouseWheelEvent.WHEEL_UNIT_SCROLL, 1, ",".equals(action) ? -1 : 1);
    4949                mouseWheelMoved(we);
     
    153153        int offMask = MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON2_DOWN_MASK;
    154154        int macMouseMask = MouseEvent.CTRL_DOWN_MASK | MouseEvent.BUTTON1_DOWN_MASK;
    155         if (e.getButton() == MouseEvent.BUTTON3 && (e.getModifiersEx() & offMask) == 0 || 
     155        if (e.getButton() == MouseEvent.BUTTON3 && (e.getModifiersEx() & offMask) == 0 ||
    156156                Main.isPlatformOsx() && e.getModifiersEx() == macMouseMask) {
    157157            startMovement(e);
  • trunk/src/org/openstreetmap/josm/gui/NotificationManager.java

    r7011 r7509  
    105105        currentNotification = queue.poll();
    106106        if (currentNotification == null) return;
    107        
     107
    108108        currentNotificationPanel = new NotificationPanel(currentNotification);
    109109        currentNotificationPanel.validate();
     
    309309                putValue(SMALL_ICON, ImageProvider.get("misc", "grey_x"));
    310310            }
    311            
     311
    312312            @Override
    313313            public void actionPerformed(ActionEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java

    r7011 r7509  
    4545    /** The speed increase per timer interval when a cursor button is clicked */
    4646    private static final double ACCELERATION = 0.10;
    47    
     47
    4848    private static final int MAC_MOUSE_BUTTON3_MASK = MouseEvent.CTRL_DOWN_MASK | MouseEvent.BUTTON1_DOWN_MASK;
    4949
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r7017 r7509  
    416416     */
    417417    abstract class CopyAction extends AbstractAction implements ListSelectionListener {
    418        
     418
    419419        protected CopyAction(String icon_name, String action_name, String short_description) {
    420420            ImageIcon icon = ImageProvider.get("dialogs/conflict", icon_name+".png");
     
    427427        }
    428428    }
    429    
     429
    430430    /**
    431431     * Action for copying selected nodes in the list of my nodes to the list of merged
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java

    r7017 r7509  
    6464    @Override
    6565    public Component getListCellRendererComponent(
    66             JList<? extends RelationMemberConflictDecisionType> list, 
     66            JList<? extends RelationMemberConflictDecisionType> list,
    6767            RelationMemberConflictDecisionType decision, int index, boolean isSelected,
    6868            boolean cellHasFocus) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverColumnModel.java

    r6623 r7509  
    1919
    2020    private final DefaultTableCellRenderer defaultTableCellRenderer = new DefaultTableCellRenderer();
    21    
     21
    2222    private final OsmPrimitivRenderer primitiveRenderer = new OsmPrimitivRenderer() {
    2323        @Override
     
    2828        }
    2929    };
    30    
     30
    3131    private final TableCellRenderer tableRenderer = new TableCellRenderer() {
    3232        @Override
     
    3737        }
    3838    };
    39    
     39
    4040    private static Component setColors(Component comp, JTable table, boolean isSelected, int row) {
    4141        RelationMemberConflictResolverModel model = (RelationMemberConflictResolverModel) table.getModel();
    42        
     42
    4343        if (!isSelected && comp != null) {
    4444            switch (model.getDecision(row).getDecision()) {
     
    5959        return comp;
    6060    }
    61    
     61
    6262    protected final void createColumns() {
    63        
     63
    6464        AutoCompletingTextField roleEditor = new AutoCompletingTextField();
    6565        RelationMemberConflictDecisionRenderer decisionRenderer = new RelationMemberConflictDecisionRenderer();
     
    105105        col.setPreferredWidth(100);
    106106        addColumn(col);
    107        
     107
    108108        // column 4 - New Way
    109109        col = new TableColumn(4);
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java

    r7005 r7509  
    137137        rebuild();
    138138    }
    139    
     139
    140140    /**
    141141     * Returns the OSM key at the given row.
     
    270270        rebuild();
    271271    }
    272    
     272
    273273    /**
    274274     * Returns the set of keys in conflict.
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java

    r7005 r7509  
    8787                        "</ul>" +
    8888                        "Symbols <tt>&deg;</tt>, <tt>&#39;</tt>, <tt>&prime;</tt>, <tt>&quot;</tt>, <tt>&Prime;</tt> are optional.<br/><br/>" +
    89                         "Some examples:<ul>{0}</ul>", 
     89                        "Some examples:<ul>{0}</ul>",
    9090                        "<li>49.29918&deg; 19.24788&deg;</li>" +
    9191                        "<li>N 49.29918 E 19.24788</li>" +
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java

    r7005 r7509  
    3333    public static final class InfoAction extends AbstractAction {
    3434        private final Layer layer;
    35        
     35
    3636        /**
    3737         * Constructs a new {@code InfoAction} for the given layer.
     
    4343            this.layer = layer;
    4444        }
    45        
     45
    4646        @Override
    4747        public void actionPerformed(ActionEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java

    r7005 r7509  
    221221                cbType.setSelectedIndex(3);
    222222            }
    223         } else if (buf.matches("[\\d,v\\s]+")) { 
    224             //fallback solution for id1,id2,id3 format 
     223        } else if (buf.matches("[\\d,v\\s]+")) {
     224            //fallback solution for id1,id2,id3 format
    225225            tfId.tryToPasteFrom(buf);
    226226        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableColumnModel.java

    r6214 r7509  
    1414
    1515    private final ChangesetCacheTableCellRenderer renderer = new ChangesetCacheTableCellRenderer();
    16    
     16
    1717    protected void createColumn(int modelIndex, String headerValue, int preferredWidth, int width) {
    1818        TableColumn col = new TableColumn(modelIndex);
     
    2626        addColumn(col);
    2727    }
    28    
     28
    2929    protected void createColumns() {
    3030
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java

    r7005 r7509  
    172172        setCurrentChangeset(cs);
    173173    }
    174    
     174
    175175    private final void alertNoPrimitivesTo(Collection<HistoryOsmPrimitive> primitives, String title, String helpTopic) {
    176176        HelpAwareOptionPane.showOptionDialog(
     
    235235
    236236    class ShowHistoryAction extends AbstractAction implements ListSelectionListener {
    237        
     237
    238238        private final class ShowHistoryTask implements Runnable {
    239239            private final Collection<HistoryOsmPrimitive> primitives;
     
    341341            }
    342342            if (target.isEmpty()) {
    343                 alertNoPrimitivesTo(selected, tr("Nothing to select"), 
     343                alertNoPrimitivesTo(selected, tr("Nothing to select"),
    344344                        HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToSelectInLayer"));
    345345                return;
     
    391391            }
    392392            if (target.isEmpty()) {
    393                 alertNoPrimitivesTo(selected, tr("Nothing to zoom to"), 
     393                alertNoPrimitivesTo(selected, tr("Nothing to zoom to"),
    394394                        HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToZoomTo"));
    395395                return;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSortUtils.java

    r6990 r7509  
    1616        // Hide default constructor for utils classes
    1717    }
    18    
     18
    1919    /**
    2020     * determine, if the way i is a roundabout and if yes, what type of roundabout
  • trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java

    r6380 r7509  
    8080        }
    8181    }
    82    
     82
    8383    /**
    8484     * Refreshes the tile sources
  • trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java

    r6990 r7509  
    2525        // Hide default constructor for utils classes
    2626    }
    27    
     27
    2828    /**
    2929     * Replies the base wiki URL.
  • trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java

    r7005 r7509  
    6363        diff();
    6464    }
    65    
     65
    6666    private void diff() {
    6767        Diff diff = new Diff(reference, current);
  • trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java

    r7005 r7509  
    2222        void jumpToPreviousMarker();
    2323    }
    24    
     24
    2525    private JumpToMarkerActions() {
    2626        // Hide default constructor for utils classes
     
    4747        private final Shortcut multikeyShortcut;
    4848        private WeakReference<Layer> lastLayer;
    49        
     49
    5050        public JumpToMarker(JumpToMarkerLayer layer, Shortcut shortcut) {
    5151            this.layer = (Layer) layer;
     
    5353            this.multikeyShortcut.setAccelerator(this);
    5454        }
    55        
     55
    5656        protected final void setLastLayer(Layer l) {
    5757            lastLayer = new WeakReference<>(l);
     
    8989            return LayerListDialog.getLayerInfoByClass(JumpToMarkerLayer.class);
    9090        }
    91        
     91
    9292        @Override
    9393        public MultikeyInfo getLastMultikeyAction() {
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r7438 r7509  
    239239        return autoDownloadEnabled;
    240240    }
    241    
     241
    242242    public void setAutoDownload(boolean val) {
    243243        autoDownloadEnabled = val;
    244244    }
    245    
     245
    246246    public boolean isAutoResolution() {
    247247        return autoResolutionEnabled;
    248248    }
    249    
     249
    250250    public void setAutoResolution(boolean val) {
    251251        autoResolutionEnabled = val;
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java

    r7024 r7509  
    8181     */
    8282    public final boolean hasGpsTime() {
    83         return (tmp != null && tmp.gpsTime != null) || gpsTime != null; 
     83        return (tmp != null && tmp.gpsTime != null) || gpsTime != null;
    8484    }
    8585
     
    9696        return getDefensiveDate(exifTime);
    9797    }
    98    
     98
    9999    /**
    100100     * Convenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy.
     
    103103     */
    104104    public final boolean hasExifTime() {
    105         return exifTime != null; 
    106     }
    107    
     105        return exifTime != null;
     106    }
     107
    108108    /**
    109109     * Returns the EXIF GPS time.
     
    114114        return getDefensiveDate(exifGpsTime);
    115115    }
    116    
     116
    117117    /**
    118118     * Convenient way to determine if this entry has a EXIF GPS time, without the cost of building a defensive copy.
     
    121121     */
    122122    public final boolean hasExifGpsTime() {
    123         return exifGpsTime != null; 
    124     }
    125    
     123        return exifGpsTime != null;
     124    }
     125
    126126    private static Date getDefensiveDate(Date date) {
    127127        if (date == null)
     
    129129        return new Date(date.getTime());
    130130    }
    131    
     131
    132132    public LatLon getExifCoor() {
    133133        return exifCoor;
     
    165165        this.exifTime = getDefensiveDate(exifTime);
    166166    }
    167    
     167
    168168    /**
    169169     * Sets the EXIF GPS time.
     
    174174        this.exifGpsTime = getDefensiveDate(exifGpsTime);
    175175    }
    176    
     176
    177177    public void setGpsTime(Date gpsTime) {
    178178        this.gpsTime = getDefensiveDate(gpsTime);
     
    250250
    251251    /**
    252      * Indicates that the image has new GPS data. 
     252     * Indicates that the image has new GPS data.
    253253     * That flag is used e.g. by the photo_geotagging plugin to decide for which image
    254254     * file the EXIF GPS data needs to be (re-)written.
     
    257257    public void flagNewGpsData() {
    258258        isNewGpsData = true;
    259         // We need to set the GPS time to tell the system (mainly the photo_geotagging plug-in) 
     259        // We need to set the GPS time to tell the system (mainly the photo_geotagging plug-in)
    260260        // that the GPS data has changed. Check for existing GPS time and take EXIF time otherwise.
    261261        // This can be removed once isNewGpsData is used instead of the GPS time.
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java

    r7005 r7509  
    131131        boolean timedMarkersOmitted = false;
    132132        boolean untimedMarkersOmitted = false;
    133         double snapDistance = Main.pref.getDouble("marker.audiofromuntimedwaypoints.distance", 1.0e-3); 
     133        double snapDistance = Main.pref.getDouble("marker.audiofromuntimedwaypoints.distance", 1.0e-3);
    134134        // about 25 m
    135135        WayPoint wayPointFromTimeStamp = null;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java

    r7246 r7509  
    112112                    return (T) String.format("#%06x%02x", ((Color) o).getRGB() & 0x00ffffff, alpha);
    113113                return (T) String.format("#%06x", ((Color) o).getRGB() & 0x00ffffff);
    114                
     114
    115115            }
    116116
     
    151151        if (o instanceof float[])
    152152            return ((float[]) o).length != 0;
    153        
     153
    154154        return null;
    155155    }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java

    r6611 r7509  
    2828     */
    2929    public OsmPrimitive parent;
    30    
     30
    3131    /**
    3232     * The same for parent selector. Only one of the 2 fields (parent or child) is not null in any environment.
  • trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java

    r7450 r7509  
    1212/**
    1313 * Setting to customize a MapPaint style.
    14  * 
    15  * Can be changed by the user in the right click menu of the mappaint style 
     14 *
     15 * Can be changed by the user in the right click menu of the mappaint style
    1616 * dialog.
    17  * 
     17 *
    1818 * Defined in the MapCSS style, e.g.
    1919 * <pre>
     
    2323 *   default: true;
    2424 * }
    25  * 
     25 *
    2626 * way[highway][setting("highway_casing")] {
    2727 *   casing-width: 2;
     
    3333
    3434    void addMenuEntry(JMenu menu);
    35    
     35
    3636    Object getValue();
    37    
     37
    3838    /**
    3939     * A style setting for boolean value (yes / no).
     
    7171            menu.add(item);
    7272        }
    73        
     73
    7474        public static BooleanStyleSetting create(Cascade c, StyleSource parentStyle, String key) {
    7575            String label = c.get("label", null, String.class);
     
    8383                return null;
    8484            }
    85             String prefKey = parentStyle.url + ":boolean:" + key; 
     85            String prefKey = parentStyle.url + ":boolean:" + key;
    8686            return new BooleanStyleSetting(parentStyle, prefKey, label, def);
    8787        }
     
    9393            return Boolean.parseBoolean(val);
    9494        }
    95        
     95
    9696    }
    9797}
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/CSSColors.java

    r7005 r7509  
    171171        return CSS_COLORS.get(key);
    172172    }
    173    
     173
    174174    private CSSColors() {
    175175        // Hide default constructor for utils classes
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r7450 r7509  
    171171            return Arrays.asList(args);
    172172        }
    173        
     173
    174174        /**
    175175         * Returns the number of elements in a list.
     
    234234            }
    235235        }
    236        
     236
    237237        public static Color rgba(float r, float g, float b, float alpha) {
    238238            try {
     
    606606            return cs.getValue();
    607607        }
    608        
     608
    609609        /**
    610610         * check if there is right-hand traffic at the current location
     
    618618            return RightAndLefthandTraffic.isRightHandTraffic(env.osm.getBBox().getCenter());
    619619        }
    620        
     620
    621621        /**
    622622         * Prints the object to the command line (for debugging purpose).
     
    641641            return o;
    642642        }
    643        
     643
    644644        /**
    645645         * Get the number of tags for the current primitive.
     
    650650            return env.osm.getNumKeys();
    651651        }
    652        
     652
    653653        /**
    654654         * Get value of a setting.
     
    784784     * Separate implementation to support overloading for different
    785785     * argument types.
    786      * 
     786     *
    787787     * The use for calculating the length of a list is deprecated, use
    788788     * {@link Functions#count(java.util.List)} instead (see #10061).
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r7450 r7509  
    7272    private String css = null;
    7373    private ZipFile zipFile;
    74    
     74
    7575    /**
    7676     * This lock prevents concurrent execution of {@link MapCSSRuleIndex#clear() } /
    7777     * {@link MapCSSRuleIndex#initIndex()} and {@link MapCSSRuleIndex#getRuleCandidates }.
    78      * 
     78     *
    7979     * For efficiency reasons, these methods are synchronized higher up the
    8080     * stack trace.
     
    8484    /**
    8585     * A collection of {@link MapCSSRule}s, that are indexed by tag key and value.
    86      * 
     86     *
    8787     * Speeds up the process of finding all rules that match a certain primitive.
    88      * 
     88     *
    8989     * Rules with a {@link SimpleKeyValueCondition} [key=value] are indexed by
    9090     * key and value in a HashMap. Now you only need to loop the tags of a
    9191     * primitive to retrieve the possibly matching rules.
    92      * 
     92     *
    9393     * Rules with no SimpleKeyValueCondition in the selector have to be
    9494     * checked separately.
    95      * 
     95     *
    9696     * The order of rules gets mixed up by this and needs to be sorted later.
    9797     */
     
    103103        /* rules without SimpleKeyValueCondition */
    104104        public final Set<MapCSSRule> remaining = new HashSet<>();
    105        
     105
    106106        public void add(MapCSSRule rule) {
    107107            rules.add(rule);
     
    110110        /**
    111111         * Initialize the index.
    112          * 
     112         *
    113113         * You must own the write lock of STYLE_SOURCE_LOCK when calling this method.
    114114         */
     
    144144            }
    145145        }
    146        
     146
    147147        /**
    148148         * Get a subset of all rules that might match the primitive.
     
    150150         * @return a Collection of rules that filters out most of the rules
    151151         * that cannot match, based on the tags of the primitive
    152          * 
     152         *
    153153         * You must have a read lock of STYLE_SOURCE_LOCK when calling this method.
    154154         */
     
    166166            Collections.sort(ruleCandidates);
    167167            return ruleCandidates;
    168         } 
     168        }
    169169
    170170        /**
    171171         * Clear the index.
    172          * 
     172         *
    173173         * You must own the write lock STYLE_SOURCE_LOCK when calling this method.
    174174         */
     
    298298        }
    299299    }
    300    
     300
    301301    @Override
    302302    public InputStream getSourceInputStream() throws IOException {
     
    356356        }
    357357    }
    358    
     358
    359359    private void loadSettings() {
    360360        settings.clear();
     
    448448            }
    449449        }
    450        
     450
    451451        // the declaration indices are sorted, so it suffices to save the
    452452        // last used index
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java

    r7378 r7509  
    2626/**
    2727 * MapCSS selector.
    28  * 
     28 *
    2929 * A rule has two parts, a selector and a declaration block
    3030 * e.g.
    3131 * <pre>
    32  * way[highway=residential]   
    33  * { width: 10; color: blue; } 
     32 * way[highway=residential]
     33 * { width: 10; color: blue; }
    3434 * </pre>
    35  * 
     35 *
    3636 * The selector decides, if the declaration block gets applied or not.
    37  * 
     37 *
    3838 * All implementing classes of Selector are immutable.
    3939 */
     
    4949     */
    5050    boolean matches(Environment env);
    51    
     51
    5252    String getSubpart();
    5353
    5454    Range getRange();
    55    
     55
    5656    /**
    5757     * Create an "optimized" copy of this selector that omits the base check.
    58      * 
     58     *
    5959     * For the style source, the list of rules is preprocessed, such that
    6060     * there is a separate list of rules for nodes, ways, ...
    61      * 
     61     *
    6262     * This means that the base check does not have to be performed
    6363     * for each rule, but only once for each primitive.
    64      * 
     64     *
    6565     * @return a selector that is identical to this object, except the base of the
    6666     * "rightmost" selector is not checked
     
    380380            return right.getRange();
    381381        }
    382        
     382
    383383        @Override
    384384        public Selector optimizedBaseCheck() {
     
    473473            super(base, zoom, conds, subpart);
    474474        }
    475        
     475
    476476        public boolean matchesConditions(Environment e) {
    477477            return super.matches(e);
     
    488488        }
    489489    }
    490    
     490
    491491    public static class OptimizedGeneralSelector extends AbstractSelector {
    492492        public final String base;
     
    510510            this.subpart = subpart;
    511511        }
    512        
     512
    513513        public OptimizedGeneralSelector(String base, Range range, List<Condition> conds, String subpart) {
    514514            super(conds);
     
    517517            this.subpart = subpart;
    518518        }
    519        
     519
    520520        public OptimizedGeneralSelector(GeneralSelector s) {
    521521            this(s.base, s.range, s.conds, s.subpart);
     
    572572            throw new UnsupportedOperationException();
    573573        }
    574        
     574
    575575        public static Range fromLevel(int a, int b) {
    576576            if (a > b)
     
    596596            return 2.0 * Math.PI * R / Math.pow(2.0, lvl) / 2.56;
    597597        }
    598        
     598
    599599        public static int scale2level(double scale) {
    600600            if (scale < 0)
  • trunk/src/org/openstreetmap/josm/gui/oauth/AuthorizationProcedureComboBox.java

    r7015 r7509  
    8080
    8181        @Override
    82         public Component getListCellRendererComponent(JList<? extends AuthorizationProcedure> list, AuthorizationProcedure procedure, 
     82        public Component getListCellRendererComponent(JList<? extends AuthorizationProcedure> list, AuthorizationProcedure procedure,
    8383                int idx, boolean isSelected, boolean hasFocus) {
    8484            renderColors(isSelected);
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r7048 r7509  
    6969 */
    7070public final class PreferenceTabbedPane extends JTabbedPane implements MouseWheelListener, ExpertModeChangeListener, ChangeListener {
    71    
     71
    7272    /**
    7373     * Allows PreferenceSettings to do validation of entered values when ok was pressed.
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r7021 r7509  
    10571057        control.repaint();
    10581058    }
    1059    
     1059
    10601060    /**
    10611061     * The method to add custom button on toolbar like search or preset buttons
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java

    r7020 r7509  
    115115        }
    116116        @Override
    117         public Component getListCellRendererComponent(JList<? extends Locale> list, Locale l, 
     117        public Component getListCellRendererComponent(JList<? extends Locale> list, Locale l,
    118118                int index, boolean isSelected, boolean cellHasFocus) {
    119119            return dispatch.getListCellRendererComponent(list,
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r7288 r7509  
    153153        Main.main.menu.imageryMenu.refreshOffsetMenu();
    154154        OffsetBookmark.saveBookmarks();
    155        
     155
    156156        DownloadDialog.getInstance().refreshTileSources();
    157157
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java

    r6733 r7509  
    9898        notification.setToolTipText(tr("When saving, display a small notification"));
    9999        panel.add(notification, GBC.eop());
    100        
     100
    101101        ActionListener autosaveEnabled = new ActionListener(){
    102102            @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionChoice.java

    r6733 r7509  
    6363    /**
    6464     * Return all projection codes supported by this projection choice.
    65      * @return all supported projection codes 
     65     * @return all supported projection codes
    6666     */
    6767    String[] allCodes();
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java

    r6990 r7509  
    9393        rbBasicAuthentication.setSelected(true);
    9494        pnlAuthenticationParameteters.add(pnlBasicAuthPreferences, BorderLayout.CENTER);
    95        
     95
    9696        //-- the panel for messages preferences
    9797        gc.gridy = 2;
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java

    r7128 r7509  
    8282        btn.setMargin(new Insets(0,0,0,0));
    8383        tagTable.addComponentNotStoppingCellEditing(btn);
    84        
     84
    8585        // paste action
    8686        pnl.add(btn = new JButton(tagTable.getPasteAction()));
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r7026 r7509  
    332332            Relation relation = new Relation();
    333333            model.applyToPrimitive(relation);
    334            
     334
    335335            String buf = Utils.getClipboardContent();
    336336            if (buf == null || buf.isEmpty() || buf.matches(CopyAction.CLIPBOARD_REGEXP)) {
     
    355355            }
    356356        }
    357        
     357
    358358        protected final void updateEnabledState() {
    359359            setEnabled(TagTable.this.isEnabled());
     
    365365        }
    366366    }
    367    
     367
    368368    /** the delete action */
    369369    private RunnableAction deleteAction = null;
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchDialog.java

    r6986 r7509  
    2020
    2121    private static TaggingPresetSearchDialog instance;
    22    
     22
    2323    /**
    2424     * Returns the unique instance of {@code TaggingPresetSearchDialog}.
     
    3131        return instance;
    3232    }
    33    
     33
    3434    private TaggingPresetSearchDialog() {
    3535        super(Main.parent, tr("Presets"), new String[] {tr("Select"), tr("Cancel")});
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java

    r6912 r7509  
    159159    /**
    160160     * Constructs a new {@code AutoCompletingTextField}.
    161      * @param columns the number of columns to use to calculate the preferred width; 
     161     * @param columns the number of columns to use to calculate the preferred width;
    162162     * if columns is set to zero, the preferred width will be whatever naturally results from the component implementation
    163163     */
  • trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java

    r7021 r7509  
    2323        addElement(new AutoCompletionListItem(s));
    2424    }
    25    
     25
    2626    /**
    2727     * Adds or moves an element to the top of the history
  • trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java

    r6890 r7509  
    7979        setState(initial);
    8080    }
    81    
     81
    8282    /**
    8383     * Constructs a new {@code QuadStateCheckBox}.
     
    9393    @Override
    9494    public void addMouseListener(MouseListener l) { }
    95    
     95
    9696    /**
    9797     * Set the new state.
     
    101101        model.setState(state);
    102102    }
    103    
    104     /** 
    105      * Return the current state, which is determined by the selection status of the model. 
    106      * @return The current state 
     103
     104    /**
     105     * Return the current state, which is determined by the selection status of the model.
     106     * @return The current state
    107107     */
    108108    public State getState() {
    109109        return model.getState();
    110110    }
    111    
     111
    112112    @Override
    113113    public void setSelected(boolean b) {
     
    121121    private final class QuadStateDecorator implements ButtonModel {
    122122        private final ButtonModel other;
    123        
     123
    124124        private QuadStateDecorator(ButtonModel other) {
    125125            this.other = other;
    126126        }
    127        
     127
    128128        private void setState(State state) {
    129129            if (state == State.NOT_SELECTED) {
     
    149149            }
    150150        }
    151        
     151
    152152        /**
    153153         * The current state is embedded in the selection / armed
  • trunk/src/org/openstreetmap/josm/gui/widgets/UrlLabel.java

    r6365 r7509  
    5151     * Constructs a new {@code UrlLabel} for the given URL and description.
    5252     * @param url The URL to use
    53      * @param description The description to display 
     53     * @param description The description to display
    5454     */
    5555    public UrlLabel(String url, String description) {
     
    6060     * Constructs a new {@code UrlLabel} for the given URL, description and font increase.
    6161     * @param url The URL to use
    62      * @param description The description to display 
     62     * @param description The description to display
    6363     * @param fontPlus The font increase in 1/72 of an inch units.
    6464     */
     
    115115        }
    116116    }
    117    
     117
    118118    @Override
    119119    public void mousePressed(MouseEvent e) {
    120120        // Ignored
    121121    }
    122    
     122
    123123    @Override
    124124    public void mouseEntered(MouseEvent e) {
    125125        // Ignored
    126126    }
    127    
     127
    128128    @Override
    129129    public void mouseExited(MouseEvent e) {
    130130        // Ignored
    131131    }
    132    
     132
    133133    @Override
    134134    public void mouseReleased(MouseEvent e) {
  • trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java

    r7030 r7509  
    7070        }
    7171    }
    72    
     72
    7373    private static class GeometryPrimitiveVisitor implements PrimitiveVisitor {
    74        
     74
    7575        private final JsonObjectBuilder geomObj;
    76        
     76
    7777        public GeometryPrimitiveVisitor(JsonObjectBuilder geomObj) {
    7878            this.geomObj = geomObj;
  • trunk/src/org/openstreetmap/josm/io/GpxReader.java

    r7033 r7509  
    507507
    508508    /**
    509      * Constructs a new {@code GpxReader}, which can later parse the input stream 
     509     * Constructs a new {@code GpxReader}, which can later parse the input stream
    510510     * and store the result in trackData and markerData
    511511     *
  • trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java

    r6882 r7509  
    3939            this.compression = compression;
    4040        }
    41        
     41
    4242        public abstract T parse() throws OsmTransferException, IllegalDataException, IOException, SAXException;
    4343    }
     
    120120        }
    121121    }
    122    
     122
    123123    protected class OsmChangeParser extends Parser<DataSet> {
    124124        protected OsmChangeParser(ProgressMonitor progressMonitor, Compression compression) {
     
    140140            super(progressMonitor, compression);
    141141        }
    142        
     142
    143143        @Override
    144144        public GpxData parse() throws OsmTransferException, IllegalDataException, IOException, SAXException {
  • trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java

    r7299 r7509  
    112112                userInfo.setLanguages(languages);
    113113            }
    114            
     114
    115115            // -- messages
    116116            xmlNode = (Node)xpath.compile("/osm/user[1]/messages/received").evaluate(document, XPathConstants.NODE);
     
    125125                }
    126126            }
    127            
     127
    128128            return userInfo;
    129129        } catch(XPathException e) {
  • trunk/src/org/openstreetmap/josm/io/OsmTransferCanceledException.java

    r6987 r7509  
    1111     */
    1212    public OsmTransferCanceledException() {
    13        
     13
    1414    }
    1515
  • trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java

    r6650 r7509  
    1212 */
    1313public final class UTFInputStreamReader extends InputStreamReader {
    14    
     14
    1515    /**
    1616     * Creates a new {@link InputStreamReader} from the {@link InputStream} with UTF-8 as default encoding.
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java

    r7005 r7509  
    4646        return new String[]{"way"};
    4747    }
    48    
     48
    4949    @Override
    5050    public String[] getOptionalParams() {
     
    6464        };
    6565    }
    66    
     66
    6767    @Override
    6868    protected void handleRequest() throws RequestHandlerErrorException, RequestHandlerBadRequestException {
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/OpenFileHandler.java

    r6536 r7509  
    2525        return new String[]{"filename"};
    2626    }
    27    
     27
    2828    @Override
    2929    public String[] getOptionalParams() {
  • trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java

    r7012 r7509  
    7474                                case "exif-coordinates":
    7575                                    entry.setExifCoor(new LatLon(
    76                                             Double.parseDouble(attrElem.getAttribute("lat")), 
     76                                            Double.parseDouble(attrElem.getAttribute("lat")),
    7777                                            Double.parseDouble(attrElem.getAttribute("lon"))));
    7878                                    break;
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java

    r7248 r7509  
    4040     */
    4141    public static final String PLUGIN_MIME_TYPES = "application/java-archive, application/zip; q=0.9, application/octet-stream; q=0.5";
    42    
     42
    4343    private final Collection<PluginInformation> toUpdate = new LinkedList<>();
    4444    private final Collection<PluginInformation> failed = new LinkedList<>();
  • trunk/src/org/openstreetmap/josm/tools/Base64.java

    r7060 r7509  
    1717        // Hide default constructor for utils classes
    1818    }
    19    
     19
    2020    /** "base64": RFC 2045 default encoding */
    2121    private static String encDefault = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  • trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java

    r7353 r7509  
    77/**
    88 * Fast index to look up properties of the earth surface.
    9  * 
     9 *
    1010 * It is expected that there is a relatively slow method to look up the property
    1111 * for a certain coordinate and that there are larger areas with a uniform
    1212 * property.
    13  * 
     13 *
    1414 * This index tries to find rectangles with uniform property and caches them.
    1515 * Rectangles are subdivided, if there are different properties within.
    1616 * (Up to a maximum level, when the slow method is used again.)
    17  * 
     17 *
    1818 * @param <T> the property (like land/water or nation)
    1919 */
    2020public class GeoPropertyIndex<T> {
    21    
     21
    2222    /**
    2323     * A method to look up a property of the earth surface.
     
    4545    private final GPLevel<T> root;
    4646    private GPLevel<T> lastLevelUsed;
    47    
     47
    4848    private static final boolean DEBUG = false;
    4949
     
    5151     * Create new GeoPropertyIndex.
    5252     * @param geoProp the input property that should be made faster by this index
    53      * @param maxLevel 
     53     * @param maxLevel
    5454     */
    5555    public GeoPropertyIndex(GeoProperty<T> geoProp, int maxLevel) {
     
    5959        this.lastLevelUsed = root;
    6060    }
    61    
     61
    6262    /**
    6363     * Look up the property for a certain point.
     
    7070        return lastLevelUsed.get(ll);
    7171    }
    72    
     72
    7373    public static int index(LatLon ll, int level) {
    7474        long noParts = 1 << level;
     
    102102            return parent.get(ll);
    103103        }
    104        
     104
    105105        private T getBounded(LatLon ll) {
    106106            if (DEBUG) System.err.print("GPLevel["+level+"]"+bbox+" ");
     
    117117                return owner.geoProp.get(ll);
    118118            }
    119            
     119
    120120            if (children == null) {
    121121                @SuppressWarnings("unchecked")
     
    123123                this.children = tmp;
    124124            }
    125            
     125
    126126            int idx = index(ll, level+1);
    127127            if (children[idx] == null) {
    128128            double lon1, lat1;
    129129                switch (idx) {
    130                     case 0: 
     130                    case 0:
    131131                        lon1 = bbox.getTopLeftLon();
    132132                        lat1 = bbox.getBottomRightLat();
     
    136136                        lat1 = bbox.getTopLeftLat();
    137137                        break;
    138                     case 2: 
     138                    case 2:
    139139                        lon1 = bbox.getBottomRightLon();
    140140                        lat1 = bbox.getBottomRightLat();
    141141                        break;
    142                     case 3: 
     142                    case 3:
    143143                        lon1 = bbox.getBottomRightLon();
    144144                        lat1 = bbox.getTopLeftLat();
     
    154154            return children[idx].getBounded(ll);
    155155        }
    156        
     156
    157157        /**
    158158         * Checks, if a point is inside this tile.
     
    163163         */
    164164        boolean isInside(LatLon ll) {
    165             return bbox.getTopLeftLon() <= ll.lon() && 
    166                     (ll.lon() < bbox.getBottomRightLon() || (ll.lon() == 180.0 && bbox.getBottomRightLon() == 180.0)) && 
    167                     bbox.getBottomRightLat() <= ll.lat() && 
     165            return bbox.getTopLeftLon() <= ll.lon() &&
     166                    (ll.lon() < bbox.getBottomRightLon() || (ll.lon() == 180.0 && bbox.getBottomRightLon() == 180.0)) &&
     167                    bbox.getBottomRightLat() <= ll.lat() &&
    168168                    (ll.lat() < bbox.getTopLeftLat() || (ll.lat() == 90.0 && bbox.getTopLeftLat() == 90.0));
    169169        }
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r7392 r7509  
    469469        return new Area(path);
    470470    }
    471    
     471
    472472    /**
    473473     * Returns the Area of a polygon, from its list of nodes.
  • trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java

    r6557 r7509  
    1717 */
    1818public final class InputMapUtils {
    19    
     19
    2020    private InputMapUtils() {
    2121        // Hide default constructor for utils classes
    2222    }
    23    
     23
    2424    /**
    2525     * Unassign Ctrl-Shift/Alt-Shift Up/Down from the given component
  • trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java

    r7012 r7509  
    55
    66public final class LanguageInfo {
    7    
     7
    88    private LanguageInfo() {
    99        // Hide default constructor for utils classes
    1010    }
    11    
     11
    1212    /**
    1313     * Type of the locale to use
     
    126126        return getJOSMLocaleCode()+".";
    127127    }
    128    
     128
    129129    public static String getLanguageCodeManifest() {
    130130        return getJOSMLocaleCode()+"_";
  • trunk/src/org/openstreetmap/josm/tools/Pair.java

    r7005 r7509  
    1010 */
    1111public final class Pair<A,B> {
    12    
     12
    1313    /**
    1414     * The first item
    1515     */
    1616    public A a;
    17    
     17
    1818    /**
    1919     * The second item
     
    6565
    6666    /**
    67      * Convenient constructor method 
     67     * Convenient constructor method
    6868     * @param u The first item
    6969     * @param v The second item
  • trunk/src/org/openstreetmap/josm/tools/Predicate.java

    r6452 r7509  
    99 */
    1010public interface Predicate<T> {
    11    
     11
    1212    /**
    1313     * Determines whether the object passes the test or not
  • trunk/src/org/openstreetmap/josm/tools/Property.java

    r6223 r7509  
    88 */
    99public interface Property<O, P> {
    10    
     10
    1111    /**
    1212     * Get the value of the property.
     
    1515     */
    1616    public P get(O obj);
    17    
     17
    1818    /**
    1919     * Set the value of the property for the object.
  • trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java

    r7248 r7509  
    2121 */
    2222public class RightAndLefthandTraffic {
    23    
     23
    2424    private static class RLTrafficGeoProperty implements GeoProperty<Boolean> {
    2525
     
    4646        }
    4747    }
    48    
     48
    4949    private static Collection<Area> leftHandTrafficPolygons;
    5050    private static GeoPropertyIndex<Boolean> rlCache;
     
    5252    /**
    5353     * Check if there is right-hand traffic at a certain location.
    54      * 
     54     *
    5555     * TODO: Synchronization can be refined inside the {@link GeoPropertyIndex}
    56      *       as most look-ups are read-only. 
     56     *       as most look-ups are read-only.
    5757     * @param ll the coordinates of the point
    5858     * @return true if there is right-hand traffic, false if there is left-hand traffic
     
    7777        rlCache = new GeoPropertyIndex<Boolean>(new RLTrafficGeoProperty(), 24);
    7878    }
    79    
     79
    8080}
Note: See TracChangeset for help on using the changeset viewer.