Changeset 3095 in osm
- Timestamp:
- 2007-06-04T11:49:27+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/livegps/livegps/LiveGpsLayer.java
r3076 r3095 42 42 void setCurrentPosition(double lat, double lon) 43 43 { 44 //System.out.println("adding pos " + lat + "," + lon); 44 45 LatLon thisPos = new LatLon(lat, lon); 45 46 if ((lastPos != null) && (thisPos.equalsEpsilon(lastPos))) { … … 95 96 @Override public void paint(Graphics g, MapView mv) 96 97 { 97 super.paint(g, mv); 98 // int statusHeight = 50; 99 // Rectangle mvs = mv.getBounds(); 100 // mvs.y = mvs.y + mvs.height - statusHeight; 101 // mvs.height = statusHeight; 102 // g.setColor(new Color(1.0f, 1.0f, 1.0f, 0.8f)); 103 // g.fillRect(mvs.x, mvs.y, mvs.width, mvs.height); 104 105 if (lastPoint != null) 106 { 107 Point screen = mv.getPoint(lastPoint.eastNorth); 108 g.setColor(Color.RED); 109 g.drawOval(screen.x-10, screen.y-10,20,20); 110 g.drawOval(screen.x-9, screen.y-9,18,18); 111 } 112 113 // lbl.setText("gpsd: "+status+" Speed: " + speed + " Course: "+course); 114 // lbl.setBounds(0, 0, mvs.width-10, mvs.height-10); 115 // Graphics sub = g.create(mvs.x+5, mvs.y+5, mvs.width-10, mvs.height-10); 116 // lbl.paint(sub); 117 118 // if(status != null) { 119 // g.setColor(Color.WHITE); 120 // g.drawString("gpsd: " + status, 5, mv.getBounds().height - 15); // lower left corner 121 // } 98 //System.out.println("in paint"); 99 synchronized (LiveGpsLock.class) { 100 //System.out.println("in synced paint"); 101 super.paint(g, mv); 102 // int statusHeight = 50; 103 // Rectangle mvs = mv.getBounds(); 104 // mvs.y = mvs.y + mvs.height - statusHeight; 105 // mvs.height = statusHeight; 106 // g.setColor(new Color(1.0f, 1.0f, 1.0f, 0.8f)); 107 // g.fillRect(mvs.x, mvs.y, mvs.width, mvs.height); 108 109 if (lastPoint != null) 110 { 111 Point screen = mv.getPoint(lastPoint.eastNorth); 112 g.setColor(Color.RED); 113 g.drawOval(screen.x-10, screen.y-10,20,20); 114 g.drawOval(screen.x-9, screen.y-9,18,18); 115 } 116 117 // lbl.setText("gpsd: "+status+" Speed: " + speed + " Course: "+course); 118 // lbl.setBounds(0, 0, mvs.width-10, mvs.height-10); 119 // Graphics sub = g.create(mvs.x+5, mvs.y+5, mvs.width-10, mvs.height-10); 120 // lbl.paint(sub); 121 122 // if(status != null) { 123 // g.setColor(Color.WHITE); 124 // g.drawString("gpsd: " + status, 5, mv.getBounds().height - 15); // lower left corner 125 // } 126 } 122 127 } 123 128
Note:
See TracChangeset
for help on using the changeset viewer.