Changeset 11357 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2016-12-03T18:16:10+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java
r10663 r11357 20 20 /** 21 21 * Command that replaces the key of one or several objects 22 * 22 * @since 3669 23 23 */ 24 24 public class ChangePropertyKeyCommand extends Command { 25 final class SinglePrimitivePseudoCommand implements PseudoCommand { 26 private final String name; 27 private final OsmPrimitive osm; 28 private final Icon icon; 29 30 SinglePrimitivePseudoCommand(String name, OsmPrimitive osm, Icon icon) { 31 this.name = name; 32 this.osm = osm; 33 this.icon = icon; 34 } 35 36 @Override 37 public String getDescriptionText() { 38 return name; 39 } 40 41 @Override 42 public Icon getDescriptionIcon() { 43 return icon; 44 } 45 46 @Override 47 public Collection<? extends OsmPrimitive> getParticipatingPrimitives() { 48 return Collections.singleton(osm); 49 } 50 } 51 25 52 /** 26 53 * All primitives, that are affected with this command. … … 108 135 for (final OsmPrimitive osm : objects) { 109 136 osm.accept(v); 110 final String name = v.name; 111 final Icon icon = v.icon; 112 children.add(new PseudoCommand() { 113 @Override 114 public String getDescriptionText() { 115 return name; 116 } 117 118 @Override 119 public Icon getDescriptionIcon() { 120 return icon; 121 } 122 123 @Override 124 public Collection<? extends OsmPrimitive> getParticipatingPrimitives() { 125 return Collections.singleton(osm); 126 } 127 }); 137 children.add(new SinglePrimitivePseudoCommand(v.name, osm, v.icon)); 128 138 } 129 139 return children;
Note:
See TracChangeset
for help on using the changeset viewer.