Changeset 9862 in josm


Ignore:
Timestamp:
2016-02-23T21:12:22+01:00 (4 years ago)
Author:
simon04
Message:

fix #12563 - Allow to customize LatLon formatting

Use the preference keys latlon.dms.decimal-format and
latlon.dm.decimal-format.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r9861 r9862  
    6363
    6464    private static DecimalFormat cDmsMinuteFormatter = new DecimalFormat("00");
    65     private static DecimalFormat cDmsSecondFormatter = new DecimalFormat("00.0");
    66     private static DecimalFormat cDmMinuteFormatter = new DecimalFormat("00.000");
     65    private static DecimalFormat cDmsSecondFormatter = new DecimalFormat(Main.pref.get("latlon.dms.decimal-format", "00.0"));
     66    private static DecimalFormat cDmMinuteFormatter = new DecimalFormat(Main.pref.get("latlon.dm.decimal-format", "00.000"));
    6767    public static final DecimalFormat cDdFormatter;
    6868    public static final DecimalFormat cDdHighPecisionFormatter;
  • trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java

    r9861 r9862  
    2020     */
    2121    @Before
    22     public void setUp() throws Exception {
     22    public void setUp() {
    2323        Locale.setDefault(Locale.GERMAN);
     24        Main.initApplicationPreferences();
    2425        Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator
    2526    }
Note: See TracChangeset for help on using the changeset viewer.