- Timestamp:
- 2020-01-10T00:02:42+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/util/NameVisitor.java
r13939 r15668 9 9 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 10 10 import org.openstreetmap.josm.data.osm.Node; 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 11 12 import org.openstreetmap.josm.data.osm.Relation; 12 13 import org.openstreetmap.josm.data.osm.Way; … … 41 42 public Icon icon; 42 43 43 pr ivate static final Icon nodeIcon = ImageProvider.get("data", "node");44 private static final Icon wayIcon = ImageProvider.get("data", "way");45 private static final Icon relIcon = ImageProvider.get("data", "relation");44 protected void setIcon(OsmPrimitive p) { 45 icon = ImageProvider.get(p.getDisplayType()); 46 } 46 47 47 48 /** … … 51 52 public void visit(Node n) { 52 53 name = n.getDisplayName(DefaultNameFormatter.getInstance()); 53 icon = nodeIcon;54 setIcon(n); 54 55 className = "node"; 55 56 classNamePlural = trn("node", "nodes", 2); … … 63 64 public void visit(Way w) { 64 65 name = w.getDisplayName(DefaultNameFormatter.getInstance()); 65 icon = wayIcon;66 setIcon(w); 66 67 className = "way"; 67 68 classNamePlural = trn("way", "ways", 2); … … 71 72 public void visit(Relation e) { 72 73 name = e.getDisplayName(DefaultNameFormatter.getInstance()); 73 icon = relIcon;74 setIcon(e); 74 75 className = "relation"; 75 76 classNamePlural = trn("relation", "relations", 2);
Note:
See TracChangeset
for help on using the changeset viewer.