Ignore:
Timestamp:
2013-07-17T00:01:49+02:00 (11 years ago)
Author:
stoecker
Message:

see #8853 remove tabs, trailing spaces, windows line ends, strange characters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r6065 r6070  
    6464        void zoomChanged();
    6565    }
    66    
     66
    6767    /**
    6868     * Interface to notify listeners of the change of the system of measurement.
     
    7777        void systemOfMeasurementChanged(String oldSoM, String newSoM);
    7878    }
    79    
     79
    8080    /**
    8181     * Simple data class that keeps map center and scale in one object.
     
    150150    /**
    151151     * Removes a SoM change listener
    152      * 
     152     *
    153153     * @param listener the listener. Ignored if null or already absent
    154154     * @since 6056
     
    160160    /**
    161161     * Adds a SoM change listener
    162      * 
     162     *
    163163     * @param listener the listener. Ignored if null or already registered.
    164164     * @since 6056
     
    169169        }
    170170    }
    171    
     171
    172172    protected static void fireSoMChanged(String oldSoM, String newSoM) {
    173173        for (SoMChangeListener l : somChangeListeners) {
     
    190190    private Rectangle paintRect = null;
    191191    private Polygon paintPoly = null;
    192    
     192
    193193    public NavigatableComponent() {
    194194        setLayout(null);
     
    728728        return getNearestNode(p, predicate, use_selected, null);
    729729    }
    730    
     730
    731731    /**
    732732     * The *result* depends on the current map selection state IF use_selected is true
     
    734734     * If more than one node within node.snap-distance pixels is found,
    735735     * the nearest node selected is returned IF use_selected is true.
    736      * 
     736     *
    737737     * If there are no selected nodes near that point, the node that is related to some of the preferredRefs
    738738     *
     
    755755    public final Node getNearestNode(Point p, Predicate<OsmPrimitive> predicate,
    756756            boolean use_selected, Collection<OsmPrimitive> preferredRefs) {
    757        
     757
    758758        Map<Double, List<Node>> nlists = getNearestNodesImpl(p, predicate);
    759759        if (nlists.isEmpty()) return null;
    760        
     760
    761761        if (preferredRefs != null && preferredRefs.isEmpty()) preferredRefs = null;
    762762        Node ntsel = null, ntnew = null, ntref = null;
     
    793793
    794794        // take nearest selected, nearest new or true nearest node to p, in that order
    795         if (ntsel != null && useNtsel) 
     795        if (ntsel != null && useNtsel)
    796796            return ntsel;
    797         if (ntref != null) 
     797        if (ntref != null)
    798798            return ntref;
    799         if (ntnew != null) 
     799        if (ntnew != null)
    800800            return ntnew;
    801801        return nlists.values().iterator().next().get(0);
     
    956956        return (ntsel != null && use_selected) ? ntsel : wayseg;
    957957    }
    958    
     958
    959959     /**
    960960     * The *result* depends on the current map selection state IF use_selected is true.
     
    974974        WaySegment wayseg = null, ntsel = null, ntref = null;
    975975        if (preferredRefs != null && preferredRefs.isEmpty()) preferredRefs = null;
    976        
     976
    977977        searchLoop: for (List<WaySegment> wslist : getNearestWaySegmentsImpl(p, predicate).values()) {
    978978            for (WaySegment ws : wslist) {
     
    10031003            }
    10041004        }
    1005         if (ntsel != null && use_selected) 
     1005        if (ntsel != null && use_selected)
    10061006            return ntsel;
    10071007        if (ntref != null)
     
    11801180     */
    11811181    public final OsmPrimitive getNearestNodeOrWay(Point p, Predicate<OsmPrimitive> predicate, boolean use_selected) {
    1182         Collection<OsmPrimitive> sel = 
     1182        Collection<OsmPrimitive> sel =
    11831183                use_selected ? getCurrentDataSet().getSelected() : null;
    11841184        OsmPrimitive osm = getNearestNode(p, predicate, use_selected, sel);
     
    12951295            }
    12961296        }
    1297        
     1297
    12981298        // add nearby nodes
    12991299        for (List<Node> nlist : getNearestNodesImpl(p, predicate).values()) {
    13001300            nearestList.addAll(nlist);
    13011301        }
    1302        
     1302
    13031303        // add parent relations of nearby nodes and ways
    13041304        Set<OsmPrimitive> parentRelations = new HashSet<OsmPrimitive>();
     
    13111311        }
    13121312        nearestList.addAll(parentRelations);
    1313        
     1313
    13141314        if (ignore != null) {
    13151315            nearestList.removeAll(ignore);
     
    13921392     */
    13931393    public static class SystemOfMeasurement {
    1394        
     1394
    13951395        /** First value, in meters, used to translate unit according to above formula. */
    13961396        public final double aValue;
     
    14041404         *  @since 5870 */
    14051405        public final double areaCustomValue;
    1406         /** Specific optional area unit. Set to {@code null} if not used. 
     1406        /** Specific optional area unit. Set to {@code null} if not used.
    14071407         *  @since 5870 */
    14081408        public final String areaCustomName;
     
    14131413         * If a quantity x is given in m (x_m) and in unit a (x_a) then it translates as
    14141414         * x_a == x_m / aValue
    1415          * 
     1415         *
    14161416         * @param aValue First value, in meters, used to translate unit according to above formula.
    14171417         * @param aName First unit used to format text.
     
    14221422            this(aValue, aName, bValue, bName, -1, null);
    14231423        }
    1424        
     1424
    14251425        /**
    14261426         * System of measurement. Currently covers only length (and area) units.
     
    14281428         * If a quantity x is given in m (x_m) and in unit a (x_a) then it translates as
    14291429         * x_a == x_m / aValue
    1430          * 
     1430         *
    14311431         * @param aValue First value, in meters, used to translate unit according to above formula.
    14321432         * @param aName First unit used to format text.
    14331433         * @param bValue Second value, in meters, used to translate unit according to above formula.
    14341434         * @param bName Second unit used to format text.
    1435          * @param areaCustomValue Specific optional area value, in squared meters, between {@code aValue*aValue} and {@code bValue*bValue}. 
     1435         * @param areaCustomValue Specific optional area value, in squared meters, between {@code aValue*aValue} and {@code bValue*bValue}.
    14361436         *                        Set to {@code -1} if not used.
    14371437         * @param areaCustomName Specific optional area unit. Set to {@code null} if not used.
    1438          * 
     1438         *
    14391439         * @since 5870
    14401440         */
     
    14821482                return formatText(a, aName+"\u00b2");
    14831483        }
    1484        
     1484
    14851485        private static String formatText(double v, String unit) {
    14861486            return String.format(Locale.US, "%." + (v<9.999999 ? 2 : 1) + "f %s", v, unit);
     
    14931493     */
    14941494    public static final SystemOfMeasurement METRIC_SOM = new SystemOfMeasurement(1, "m", 1000, "km", 10000, "ha");
    1495    
     1495
    14961496    /**
    14971497     * Chinese system.
     
    14991499     */
    15001500    public static final SystemOfMeasurement CHINESE_SOM = new SystemOfMeasurement(1.0/3.0, "\u5e02\u5c3a" /* chi */, 500, "\u5e02\u91cc" /* li */);
    1501    
     1501
    15021502    /**
    15031503     * Imperial system (British Commonwealth and former British Empire).
     
    15051505     */
    15061506    public static final SystemOfMeasurement IMPERIAL_SOM = new SystemOfMeasurement(0.3048, "ft", 1609.344, "mi", 4046.86, "ac");
    1507    
     1507
    15081508    /**
    15091509     * Nautical mile system (navigation, polar exploration).
     
    15791579        Cursors = c;
    15801580    }
    1581    
     1581
    15821582    @Override
    15831583    public void paint(Graphics g) {
     
    16131613        }
    16141614    }
    1615    
     1615
    16161616    /**
    16171617     * Requests to paint the given {@code Polygon} as a polyline (unclosed polygon).
     
    16281628        }
    16291629    }
    1630    
     1630
    16311631    /**
    16321632     * Requests to clear the rectangled previously drawn.
Note: See TracChangeset for help on using the changeset viewer.