Changeset 5077 in josm for trunk/src/org
- Timestamp:
- 2012-03-13T20:25:45+01:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/AddCommand.java
r4918 r5077 74 74 @Override 75 75 public Icon getDescriptionIcon() { 76 return ImageProvider.get( OsmPrimitiveType.from(osm));76 return ImageProvider.get(osm.getDisplayType()); 77 77 } 78 78 -
trunk/src/org/openstreetmap/josm/command/ChangeCommand.java
r4918 r5077 6 6 7 7 import java.util.Collection; 8 8 9 import javax.swing.Icon; 9 10 … … 62 63 @Override 63 64 public Icon getDescriptionIcon() { 64 return ImageProvider.get( OsmPrimitiveType.from(osm));65 return ImageProvider.get(osm.getDisplayType()); 65 66 } 66 67 } -
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r4918 r5077 14 14 import java.util.List; 15 15 import java.util.Map; 16 16 17 import javax.swing.Icon; 17 18 … … 181 182 } 182 183 } 183 184 184 185 if (allnull) { 185 186 text = tr("Deleted {0} properties for {1} objects", tags.size(), objects.size()); … … 206 207 207 208 @Override public Icon getDescriptionIcon() { 208 return ImageProvider.get( OsmPrimitiveType.from(osm));209 return ImageProvider.get(osm.getDisplayType()); 209 210 } 210 211 -
trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java
r4918 r5077 7 7 8 8 import javax.swing.Icon; 9 9 10 import org.openstreetmap.josm.data.osm.OsmPrimitive; 10 11 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 40 41 41 42 @Override public boolean executeCommand() { 42 if (position < 0 || position >= relation.getMembersCount()) {43 if (position < 0 || position >= relation.getMembersCount()) 43 44 return false; 44 }45 45 46 46 oldRole = relation.getMember(position).getRole(); … … 71 71 @Override 72 72 public Icon getDescriptionIcon() { 73 return ImageProvider.get( OsmPrimitiveType.from(relation));73 return ImageProvider.get(relation.getDisplayType()); 74 74 } 75 75 } -
trunk/src/org/openstreetmap/josm/command/ConflictAddCommand.java
r4918 r5077 5 5 6 6 import java.util.Collection; 7 7 8 import javax.swing.Icon; 8 9 import javax.swing.JOptionPane; … … 11 12 import org.openstreetmap.josm.data.conflict.Conflict; 12 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 13 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;14 14 import org.openstreetmap.josm.gui.DefaultNameFormatter; 15 15 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 70 70 @Override 71 71 public Icon getDescriptionIcon() { 72 return ImageProvider.get( OsmPrimitiveType.from(conflict.getMy()));72 return ImageProvider.get(conflict.getMy().getDisplayType()); 73 73 } 74 74 } -
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r5060 r5077 2 2 package org.openstreetmap.josm.command; 3 3 4 import java.awt.GridBagLayout;5 import java.awt.geom.Area;6 4 import static org.openstreetmap.josm.tools.I18n.marktr; 7 5 import static org.openstreetmap.josm.tools.I18n.tr; 8 6 import static org.openstreetmap.josm.tools.I18n.trn; 9 7 8 import java.awt.GridBagLayout; 9 import java.awt.geom.Area; 10 10 import java.util.ArrayList; 11 11 import java.util.Collection; … … 19 19 import java.util.Set; 20 20 import java.util.Map.Entry; 21 21 22 import javax.swing.Icon; 22 23 23 import javax.swing.JLabel; 24 25 24 import javax.swing.JOptionPane; 26 25 import javax.swing.JPanel; 26 27 27 import org.openstreetmap.josm.Main; 28 28 import org.openstreetmap.josm.actions.SplitWayAction; … … 160 160 @Override 161 161 public String getDescriptionText() { 162 162 if (toDelete.size() == 1) { 163 163 OsmPrimitive primitive = toDelete.iterator().next(); 164 164 String msg = ""; … … 189 189 @Override 190 190 public Icon getDescriptionIcon() { 191 if (toDelete.size() == 1) { 192 return ImageProvider.get(OsmPrimitiveType.from(toDelete.iterator().next())); 193 } 191 if (toDelete.size() == 1) 192 return ImageProvider.get(toDelete.iterator().next().getDisplayType()); 194 193 Set<OsmPrimitiveType> typesToDelete = getTypesToDelete(); 195 if (typesToDelete.size() > 1) {194 if (typesToDelete.size() > 1) 196 195 return ImageProvider.get("data", "object"); 197 } else {196 else 198 197 return ImageProvider.get(typesToDelete.iterator().next()); 199 }200 198 } 201 199 … … 213 211 214 212 @Override public Icon getDescriptionIcon() { 215 return ImageProvider.get( OsmPrimitiveType.from(osm));213 return ImageProvider.get(osm.getDisplayType()); 216 214 } 217 215 … … 345 343 346 344 Collection<Relation> relationsToDelete = Utils.filteredCollection(primitivesToDelete, Relation.class); 347 if(!relationsToDelete.isEmpty() && !silent && !confirmRelationDeletion(relationsToDelete)) { 348 return null; 349 } 345 if(!relationsToDelete.isEmpty() && !silent && !confirmRelationDeletion(relationsToDelete)) 346 return null; 350 347 351 348 Collection<Way> waysToBeChanged = new HashSet<Way>(); -
trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
r3479 r5077 26 26 import org.openstreetmap.josm.data.osm.Node; 27 27 import org.openstreetmap.josm.data.osm.OsmPrimitive; 28 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;29 28 import org.openstreetmap.josm.data.osm.Relation; 30 29 import org.openstreetmap.josm.data.osm.Way; … … 89 88 final JLabel primitiveLabel = new JLabel( 90 89 primitive.getDisplayName(DefaultNameFormatter.getInstance()) + ":", 91 ImageProvider.get( OsmPrimitiveType.from(primitive)),90 ImageProvider.get(primitive.getDisplayType()), 92 91 JLabel.LEFT 93 92 ); … … 116 115 final JLabel primitiveLabel = new JLabel( 117 116 primitive.getDisplayName(DefaultNameFormatter.getInstance()), 118 ImageProvider.get( OsmPrimitiveType.from(primitive)),117 ImageProvider.get(primitive.getDisplayType()), 119 118 JLabel.LEFT 120 119 );
Note:
See TracChangeset
for help on using the changeset viewer.