Changeset 3601 in osm for applications/editors/josm
- Timestamp:
- 2007-07-15T17:09:07+02:00 (17 years ago)
- Location:
- applications/editors/josm/plugins/mappaint/src/mappaint
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/AreaElemStyle.java
r1501 r3601 6 6 Color colour; 7 7 8 public AreaElemStyle (Color colour, int m inZoom)8 public AreaElemStyle (Color colour, int maxScale, int minScale) 9 9 { 10 10 this.colour = colour; 11 this.minZoom = minZoom; 11 this.maxScale = maxScale; 12 this.minScale = minScale; 12 13 } 13 14 -
applications/editors/josm/plugins/mappaint/src/mappaint/ElemStyle.java
r1501 r3601 4 4 { 5 5 // zoom range to display the feature 6 protected int minZoom; 6 protected int minScale; 7 protected int maxScale; 7 8 8 public int getMin Zoom()9 public int getMinScale() 9 10 { 10 return minZoom; 11 return minScale; 12 } 13 public int getMaxScale() 14 { 15 return maxScale; 11 16 } 12 17 } -
applications/editors/josm/plugins/mappaint/src/mappaint/ElemStyleHandler.java
r3593 r3601 15 15 public class ElemStyleHandler extends DefaultHandler 16 16 { 17 boolean inDoc, inRule, inCondition, inElemStyle, inLine, inIcon, inArea, inScaleMax ;17 boolean inDoc, inRule, inCondition, inElemStyle, inLine, inIcon, inArea, inScaleMax, inScaleMin; 18 18 ElemStyles styles = null; 19 19 String curKey = null; … … 27 27 boolean curIconAnnotate = true; 28 28 int curScaleMax = 1000000000; 29 int curScaleMin = 0; 29 30 30 31 public ElemStyleHandler( ) … … 94 95 { 95 96 inScaleMax = true; 97 } 98 else if (qName.equals("scale_min")) 99 { 100 inScaleMin = true; 96 101 } 97 102 else if (qName.equals("icon")) … … 143 148 { 144 149 newStyle = new LineElemStyle(curLineWidth, curLineRealWidth, curLineColour, 145 curLineDashed, curScaleMax );150 curLineDashed, curScaleMax, curScaleMin); 146 151 styles.add (curKey, curValue, newStyle); 147 152 curLineWidth = 1; … … 152 157 if(curIcon != null) 153 158 { 154 newStyle = new IconElemStyle(curIcon, curIconAnnotate,curScaleMax);159 newStyle = new IconElemStyle(curIcon, curIconAnnotate, curScaleMax, curScaleMin); 155 160 styles.add (curKey, curValue, newStyle); 156 161 curIcon = null; … … 159 164 if(curAreaColour != null) 160 165 { 161 newStyle = new AreaElemStyle (curAreaColour, curScaleMax);166 newStyle = new AreaElemStyle (curAreaColour, curScaleMax, curScaleMin); 162 167 styles.add (curKey, curValue, newStyle); 163 168 curAreaColour = null; 164 169 } 165 170 curScaleMax = 1000000000; 171 curScaleMin = 0; 166 172 167 173 } … … 175 181 inArea = false; 176 182 else if (qName.equals("scale_max")) 177 {178 inScaleMax = false;179 }183 inScaleMax = false; 184 else if (qName.equals("scale_min")) 185 inScaleMin = false; 180 186 } 181 187 … … 187 193 curScaleMax = Integer.parseInt(content); 188 194 } 195 if( inScaleMin == true) { 196 String content = new String(ch, start, length); 197 198 curScaleMin = Integer.parseInt(content); 199 } 189 200 } 190 201 } -
applications/editors/josm/plugins/mappaint/src/mappaint/IconElemStyle.java
r3592 r3601 7 7 boolean annotate; 8 8 9 public IconElemStyle (ImageIcon icon, boolean annotate, int m inZoom)9 public IconElemStyle (ImageIcon icon, boolean annotate, int maxScale, int minScale) 10 10 { 11 11 this.icon=icon; 12 12 this.annotate=annotate; 13 this.minZoom = minZoom; 13 this.maxScale = maxScale; 14 this.minScale = minScale; 14 15 } 15 16 -
applications/editors/josm/plugins/mappaint/src/mappaint/LineElemStyle.java
r3593 r3601 9 9 boolean dashed = false; 10 10 11 public LineElemStyle (int width, int realWidth, Color colour, boolean dashed, int m inZoom)11 public LineElemStyle (int width, int realWidth, Color colour, boolean dashed, int maxScale, int minScale) 12 12 { 13 13 this.width = width; … … 15 15 this.colour = colour; 16 16 this.dashed = dashed; 17 this.minZoom = minZoom; 17 this.maxScale = maxScale; 18 this.minScale = minScale; 18 19 } 19 20 -
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
r3593 r3601 47 47 } 48 48 49 if(circum>=e.getM inZoom() / 70) {49 if(circum>=e.getMaxScale() / 70 || circum<e.getMinScale() / 70) { 50 50 return false; 51 51 } else {
Note:
See TracChangeset
for help on using the changeset viewer.