Changeset 3593 in osm for applications/editors/josm
- Timestamp:
- 2007-07-15T04:42:24+02:00 (17 years ago)
- Location:
- applications/editors/josm/plugins/mappaint/src/mappaint
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/ElemStyleHandler.java
r3591 r3593 21 21 int curLineWidth = 1; 22 22 int curLineRealWidth = 0; 23 boolean curLineDashed = false; 23 24 Color curLineColour = null; 24 25 Color curAreaColour = null; … … 86 87 else if (atts.getQName(count).equals("realwidth")) 87 88 curLineRealWidth=Integer.parseInt(atts.getValue(count)); 89 else if (atts.getQName(count).equals("dashed")) 90 curLineDashed=Boolean.parseBoolean(atts.getValue(count)); 88 91 } 89 92 } … … 139 142 if(curLineWidth != -1) 140 143 { 141 newStyle = new LineElemStyle(curLineWidth, curLineRealWidth, curLineColour, 142 cur ScaleMax);144 newStyle = new LineElemStyle(curLineWidth, curLineRealWidth, curLineColour, 145 curLineDashed, curScaleMax); 143 146 styles.add (curKey, curValue, newStyle); 144 147 curLineWidth = 1; 145 148 curLineRealWidth= 0; 149 curLineDashed = false; 146 150 curLineColour = null; 147 151 } -
applications/editors/josm/plugins/mappaint/src/mappaint/LineElemStyle.java
r2787 r3593 7 7 int realWidth = 0; //the real width of this line in meter 8 8 Color colour; 9 boolean dashed = false; 9 10 10 public LineElemStyle (int width, int realWidth, Color colour, int minZoom)11 public LineElemStyle (int width, int realWidth, Color colour, boolean dashed, int minZoom) 11 12 { 12 13 this.width = width; 13 14 this.realWidth = realWidth; 14 15 this.colour = colour; 16 this.dashed = dashed; 15 17 this.minZoom = minZoom; 16 18 } … … 33 35 @Override public String toString() 34 36 { 35 return "LineElemStyle: width= " + width + " colour=" + colour;37 return "LineElemStyle: width= " + width + "realWidth= " + realWidth + " colour=" + colour + " dashed=" + dashed; 36 38 } 37 39 } -
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
r3591 r3593 66 66 if(nodeStyle instanceof IconElemStyle) { 67 67 if(isZoomOk(nodeStyle)) { 68 drawNode(n, ((IconElemStyle)nodeStyle).getIcon() );68 drawNode(n, ((IconElemStyle)nodeStyle).getIcon(), ((IconElemStyle)nodeStyle).doAnnotate()); 69 69 } 70 70 } else { … … 102 102 int width = 2; 103 103 int realWidth = 0; //the real width of the element in meters 104 boolean dashed = false; 104 105 boolean area=false; 105 106 ElemStyle wayStyle = MapPaintPlugin.elemStyles.getStyle(w); … … 116 117 width = ((LineElemStyle)wayStyle).getWidth(); 117 118 realWidth = ((LineElemStyle)wayStyle).getRealWidth(); 119 dashed = ((LineElemStyle)wayStyle).dashed; 118 120 } 119 121 else if (wayStyle instanceof AreaElemStyle) … … 143 145 } 144 146 145 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour,showDirection, width, false);147 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour,showDirection, width,dashed); 146 148 if (!ls.incomplete && Main.pref.getBoolean("draw.segment.order_number")) 147 149 { … … 182 184 183 185 // NEW 184 protected void drawNode(Node n, ImageIcon icon ) {186 protected void drawNode(Node n, ImageIcon icon, boolean annotate) { 185 187 Point p = nc.getPoint(n.eastNorth); 186 188 if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth()) || (p.y > nc.getHeight())) return; … … 188 190 icon.paintIcon ( Main.map.mapView, g, p.x-w/2, p.y-h/2 ); 189 191 String name = (n.keys==null) ? null : n.keys.get("name"); 190 if (name!=null )192 if (name!=null && annotate) 191 193 { 192 194 g.setColor( getPreferencesColor ("text", Color.WHITE));
Note:
See TracChangeset
for help on using the changeset viewer.