Changeset 11542 in josm
- Timestamp:
- 2017-02-07T22:00:43+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r11462 r11542 43 43 import org.openstreetmap.josm.data.osm.Way; 44 44 import org.openstreetmap.josm.data.osm.WaySegment; 45 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;46 45 import org.openstreetmap.josm.data.preferences.ColorProperty; 47 46 import org.openstreetmap.josm.gui.MainMenu; … … 305 304 initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay", 200); 306 305 initialMoveThreshold = Main.pref.getInteger("extrude.initial-move-threshold", 1); 307 mainColor = new ColorProperty(marktr("Extrude: main line"), (Color) null).get(); 308 if (mainColor == null) mainColor = PaintColors.SELECTED.get(); 306 mainColor = new ColorProperty(marktr("Extrude: main line"), Color.RED).get(); 309 307 helperColor = new ColorProperty(marktr("Extrude: helper line"), Color.ORANGE).get(); 310 308 helperStrokeDash = GuiHelper.getCustomizedStroke(Main.pref.get("extrude.stroke.helper-line", "1 4")); -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r11381 r11542 36 36 import org.openstreetmap.josm.data.osm.Way; 37 37 import org.openstreetmap.josm.data.osm.WaySegment; 38 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;39 38 import org.openstreetmap.josm.data.preferences.CachingProperty; 40 39 import org.openstreetmap.josm.data.preferences.ColorProperty; … … 155 154 @Override 156 155 protected void readPreferences() { 157 guideColor = new ColorProperty(marktr("improve way accuracy helper line"), (Color) null).get(); 158 if (guideColor == null) 159 guideColor = PaintColors.HIGHLIGHT.get(); 156 guideColor = new ColorProperty(marktr("improve way accuracy helper line"), Color.RED).get(); 160 157 } 161 158 -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
r11144 r11542 33 33 import org.openstreetmap.josm.data.osm.Way; 34 34 import org.openstreetmap.josm.data.osm.WaySegment; 35 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;36 35 import org.openstreetmap.josm.data.preferences.AbstractToStringProperty; 37 36 import org.openstreetmap.josm.data.preferences.BooleanProperty; … … 106 105 private static final CachingProperty<Double> SNAP_DISTANCE_CHINESE = new DoubleProperty(prefKey("snap-distance-chinese"), 1).cached(); 107 106 private static final CachingProperty<Double> SNAP_DISTANCE_NAUTICAL = new DoubleProperty(prefKey("snap-distance-nautical"), 0.1).cached(); 108 private static final CachingProperty<Color> MAIN_COLOR = new ColorProperty(marktr("make parallel helper line"), (Color) null).cached();107 private static final CachingProperty<Color> MAIN_COLOR = new ColorProperty(marktr("make parallel helper line"), Color.RED).cached(); 109 108 110 109 private static final CachingProperty<Map<Modifier, Boolean>> SNAP_MODIFIER_COMBO … … 461 460 462 461 Color mainColor = MAIN_COLOR.get(); 463 if (mainColor == null) {464 mainColor = PaintColors.SELECTED.get();465 }466 467 462 // FIXME: should clip the line (gets insanely slow when zoomed in on a very long line 468 463 g.setStroke(REF_LINE_STROKE.get()); -
trunk/src/org/openstreetmap/josm/data/preferences/ColorProperty.java
r10922 r11542 5 5 import java.util.Locale; 6 6 7 import org.openstreetmap.josm.tools.CheckParameterUtil; 7 8 import org.openstreetmap.josm.tools.ColorHelper; 8 9 … … 21 22 */ 22 23 public ColorProperty(String colName, String defaultValue) { 23 this(colName, defaultValue == null ? null :ColorHelper.html2color(defaultValue));24 this(colName, ColorHelper.html2color(defaultValue)); 24 25 } 25 26 … … 31 32 public ColorProperty(String colName, Color defaultValue) { 32 33 super(getColorKey(colName), defaultValue); 34 CheckParameterUtil.ensureParameterNotNull(defaultValue, "defaultValue"); 33 35 this.name = colName; 34 36 getPreferences().registerColor(getColorKey(colName), colName);
Note:
See TracChangeset
for help on using the changeset viewer.