Changeset 1843 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-07-25T18:37:45+02:00 (17 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 2 edited
-
OsmPrimitive.java (modified) (4 diffs)
-
visitor/MapPaintVisitor.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r1762 r1843 29 29 */ 30 30 abstract public class OsmPrimitive implements Comparable<OsmPrimitive> { 31 32 /**33 * The key/value list for this primitive.34 */35 public Map<String, String> keys;36 31 37 32 /* mappaint data */ … … 219 214 } 220 215 216 /*------------ 217 * Keys handling 218 ------------*/ 219 220 /** 221 * The key/value list for this primitive. 222 */ 223 public Map<String, String> keys; 224 221 225 /** 222 226 * Set the given value to the given key … … 248 252 } 249 253 250 public String getName() { 251 return null; 254 /** 255 * Added in revision 1843 256 * Please do not use in plug-ins until this version becomes JOSM tested 257 */ 258 public final void removeAll() { 259 keys = null; 260 mappaintStyle = null; 252 261 } 253 262 … … 266 275 return Collections.emptyList(); 267 276 return keys.keySet(); 277 } 278 279 /** 280 * Added in revision 1843 281 * Please do not use in plug-ins until this version becomes JOSM tested 282 */ 283 public final boolean hasKeys() { 284 return keys != null && !keys.isEmpty(); 285 } 286 287 288 289 290 291 292 public String getName() { 293 return null; 268 294 } 269 295 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r1755 r1843 495 495 return; 496 496 } 497 else if (drawMultipolygon && r.keys != null &&"multipolygon".equals(r.keys.get("type")))497 else if (drawMultipolygon && "multipolygon".equals(r.get("type"))) 498 498 { 499 499 if(drawMultipolygon(r)) 500 500 return; 501 501 } 502 else if (drawRestriction && r.keys != null &&"restriction".equals(r.keys.get("type")))502 else if (drawRestriction && "restriction".equals(r.get("type"))) 503 503 { 504 504 drawRestriction(r); … … 751 751 752 752 if (nodeStyle == null) { 753 r.putError(tr("Style for restriction {0} not found.", r. keys.get("restriction")), true);753 r.putError(tr("Style for restriction {0} not found.", r.get("restriction")), true); 754 754 return; 755 755 } … … 1112 1112 protected String getNodeName(Node n) { 1113 1113 String name = null; 1114 if (n. keys != null) {1114 if (n.hasKeys()) { 1115 1115 for (String rn : regionalNameOrder) { 1116 name = n. keys.get(rn);1116 name = n.get(rn); 1117 1117 if (name != null) break; 1118 1118 }
Note:
See TracChangeset
for help on using the changeset viewer.
