Changeset 1670 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2009-06-15T20:22:46+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/command
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/CoordinateConflictResolveCommand.java
r1654 r1670 33 33 /** the merge decision */ 34 34 private final MergeDecisionType decision; 35 36 37 /**38 * replies a (localized) display name for the type of an OSM primitive39 *40 * @param primitive the primitive41 * @return a localized display name42 */43 protected String getPrimitiveTypeAsString(OsmPrimitive primitive) {44 if (primitive instanceof Node) return tr("node");45 if (primitive instanceof Way) return tr("way");46 if (primitive instanceof Relation) return tr("relation");47 return "";48 }49 35 50 36 /** -
trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java
r1654 r1670 14 14 import org.openstreetmap.josm.data.osm.Node; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 16 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 16 17 import org.openstreetmap.josm.data.osm.Relation; 17 18 import org.openstreetmap.josm.data.osm.Way; … … 52 53 53 54 /** 54 * replies a (localized) display name for the type of an OSM primitive55 *56 * @param primitive the primitive57 * @return a localized display name58 */59 protected String getPrimitiveTypeAsString(OsmPrimitive primitive) {60 if (primitive instanceof Node) return tr("node");61 if (primitive instanceof Way) return tr("way");62 if (primitive instanceof Relation) return tr("relation");63 return "";64 }65 66 /**67 55 * constructor 68 56 * … … 82 70 return new DefaultMutableTreeNode( 83 71 new JLabel( 84 tr("Resolve {0} tag conflicts in {1} {2}",getNumDecidedConflicts(), getPrimitiveTypeAsString(my), my.id),72 tr("Resolve {0} tag conflicts in {1} {2}",getNumDecidedConflicts(), OsmPrimitiveType.from(my).getLocalizedDisplayNameSingular(), my.id), 85 73 ImageProvider.get("data", "object"), 86 74 JLabel.HORIZONTAL -
trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java
r1654 r1670 13 13 import org.openstreetmap.josm.data.osm.Node; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 15 16 import org.openstreetmap.josm.data.osm.Relation; 16 17 import org.openstreetmap.josm.data.osm.Way; … … 37 38 } 38 39 39 //FIXME copied from TagConflictResolveCommand -> refactor40 /**41 * replies a (localized) display name for the type of an OSM primitive42 *43 * @param primitive the primitive44 * @return a localized display name45 */46 protected String getPrimitiveTypeAsString(OsmPrimitive primitive) {47 if (primitive instanceof Node) return tr("node");48 if (primitive instanceof Way) return tr("way");49 if (primitive instanceof Relation) return tr("relation");50 return "";51 }52 53 40 @Override 54 41 public MutableTreeNode description() { 55 42 return new DefaultMutableTreeNode( 56 43 new JLabel( 57 tr("Resolve version conflicts for {0} {1}", getPrimitiveTypeAsString(my), my.id),44 tr("Resolve version conflicts for {0} {1}",OsmPrimitiveType.from(my).getLocalizedDisplayNameSingular(), my.id), 58 45 ImageProvider.get("data", "object"), 59 46 JLabel.HORIZONTAL
Note: See TracChangeset
for help on using the changeset viewer.