Changeset 3835 in osm for applications/editors/josm
- Timestamp:
- 2007-07-29T01:04:38+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/livegps/livegps/LiveGpsLayer.java
r3742 r3835 15 15 import org.openstreetmap.josm.gui.MapView; 16 16 import org.openstreetmap.josm.gui.layer.RawGpsLayer; 17 import org.openstreetmap.josm.tools.ColorHelper; 17 18 18 19 public class LiveGpsLayer extends RawGpsLayer implements PropertyChangeListener { 19 public final static String LAYER_NAME = "LiveGPS layer"; 20 public static final String LAYER_NAME = "LiveGPS layer"; 21 public static final String KEY_LIVEGPS_COLOR ="color.livegps.position"; 20 22 LatLon lastPos; 21 23 GpsPoint lastPoint; … … 109 111 // g.fillRect(mvs.x, mvs.y, mvs.width, mvs.height); 110 112 113 111 114 if (lastPoint != null) 112 115 { 116 String colorString = Main.pref.get(KEY_LIVEGPS_COLOR); 117 if(colorString.length() == 0) { 118 colorString = ColorHelper.color2html(Color.RED); 119 Main.pref.put(KEY_LIVEGPS_COLOR, colorString); 120 } 121 Color color = ColorHelper.html2color(colorString); 113 122 Point screen = mv.getPoint(lastPoint.eastNorth); 114 g.setColor( Color.RED);123 g.setColor(color); 115 124 g.drawOval(screen.x-10, screen.y-10,20,20); 116 125 g.drawOval(screen.x-9, screen.y-9,18,18);
Note:
See TracChangeset
for help on using the changeset viewer.