Changeset 12990 in josm
- Timestamp:
- 2017-10-12T22:17:38+02:00 (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r12989 r12990 1006 1006 * @param def default value 1007 1007 * @return a Color object for the configured colour, or the default value if none configured. 1008 * @deprecated Use a {@link ColorProperty} instead.1008 * @deprecated Use a {@link NamedColorProperty} instead. 1009 1009 */ 1010 1010 @Deprecated … … 1045 1045 * @param def default value 1046 1046 * @return a Color object for the configured colour, or the default value if none configured. 1047 * @deprecated Use a {@link ColorProperty} instead.1048 * You can replace this by: <code>new ColorProperty(colName, def).getChildColor(specName)</code>1047 * @deprecated Use a {@link NamedColorProperty} instead. 1048 * You can replace this by: <code>new NamedColorProperty(colName, def).getChildColor(specName)</code> 1049 1049 */ 1050 1050 @Deprecated … … 1095 1095 * @param val The color 1096 1096 * @return true if the setting was modified 1097 * @see ColorProperty#put(Color)1097 * @see NamedColorProperty#put(Color) 1098 1098 * @deprecated (since 12987) no longer supported (see {@link NamedColorProperty}) 1099 1099 */ -
trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
r12989 r12990 141 141 */ 142 142 public boolean isDefault() { 143 return info.getValue() == null || Objects.equals(info.getValue(), 143 return info.getValue() == null || Objects.equals(info.getValue(), info.getDefaultValue()); 144 144 } 145 145 -
trunk/test/unit/org/openstreetmap/josm/gui/layer/LayerTest.java
r12989 r12990 59 59 assertEquals(Color.BLACK, color.get()); 60 60 assertEquals(Color.BLACK, color.getDefaultValue()); 61 assertEquals("c olor.layer.test.layer", color.getKey());61 assertEquals("clr.layer.Test Layer.x", color.getKey()); 62 62 } 63 63 -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
r10837 r12990 6 6 import org.junit.Test 7 7 import org.openstreetmap.josm.JOSMFixture 8 import org.openstreetmap.josm.Main9 8 import org.openstreetmap.josm.data.coor.LatLon 10 9 import org.openstreetmap.josm.data.osm.DataSet … … 308 307 def expected = new Color(0x88DD22) 309 308 assert e.getCascade(Environment.DEFAULT_LAYER).get("color") == expected 310 assert Main.pref.getDefaultColor("mappaint.mapcss.testcolour1") == expected311 309 } 312 310 … … 317 315 def expected = new Color(0x12, 0x34, 0x56, 0x78) 318 316 assert e.getCascade(Environment.DEFAULT_LAYER).get("color") == expected 319 assert Main.pref.getDefaultColor("mappaint.mapcss.testcolour2") == expected320 317 } 321 318
Note:
See TracChangeset
for help on using the changeset viewer.