Changeset 30737 in osm for applications/editors/josm/plugins/HouseNumberTaggingTool/src/org
- Timestamp:
- 2014-10-18T23:07:52+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java
r30532 r30737 50 50 private static final String APPLY_CHANGES = tr("Apply Changes"); 51 51 private static final String TAG_STREET_OR_PLACE = tr("Use tag ''addr:street'' or ''addr:place''"); 52 52 53 53 public static final String TAG_BUILDING = "building"; 54 54 public static final String TAG_ADDR_COUNTRY = "addr:country"; … … 61 61 62 62 public static final String[] buildingStrings = {"yes", "apartments", "chapel", "church", "commercial", "dormitory", "hotel", "house", "residential", "terrace", "industrial", "retail", "warehouse", "cathedral", "civic", "hospital", "school", "train_station", "transportation", "university", "public", "bridge", "bunker", "cabin", "construction", "farm_auxiliary", "garage", "garages" , "greenhouse", "hangar", "hut", "roof", "shed", "stable" }; 63 63 64 64 private static final int FPS_MIN = -2; 65 65 private static final int FPS_MAX = 2; 66 66 67 67 private static final long serialVersionUID = 6414385452106276923L; 68 68 … … 140 140 Arrays.sort(buildingStrings); 141 141 building = new JComboBox<>(buildingStrings); 142 building.setSelectedItem(dto.getBuilding()); 142 building.setSelectedItem(dto.getBuilding()); 143 143 building.setMaximumRowCount(50); 144 144 c.gridx = 3; … … 147 147 c.gridwidth = 1; 148 148 editPanel.add(building, c); 149 149 150 150 // country 151 151 countryEnabled = new JCheckBox(TAG_ADDR_COUNTRY); … … 258 258 editPanel.add(streetEnabled, c); 259 259 260 260 261 261 streetRadio = new JRadioButton(TAG_ADDR_STREET); 262 262 streetRadio.setToolTipText(TAG_STREET_OR_PLACE); … … 269 269 c.gridwidth = 1; 270 270 editPanel.add(streetRadio, c); 271 271 272 272 placeRadio = new JRadioButton("addr:place"); 273 273 placeRadio.setToolTipText(TAG_STREET_OR_PLACE); … … 280 280 c.gridwidth = 1; 281 281 editPanel.add(placeRadio, c); 282 282 283 283 ButtonGroup g = new ButtonGroup(); 284 g.add( streetRadio ); 284 g.add( streetRadio ); 285 285 g.add( placeRadio ); 286 286 287 287 street = new AutoCompletingComboBox(); 288 288 if (dto.isTagStreet()) … … 318 318 housnumber = new JTextField(); 319 319 housnumber.setPreferredSize(new Dimension(200, 24)); 320 320 321 321 int number = 0; 322 322 try { … … 327 327 housnumber.setText(String.valueOf(number)); 328 328 } 329 330 329 330 331 331 c.fill = GridBagConstraints.HORIZONTAL; 332 332 c.gridx = 3; … … 335 335 c.gridwidth = 1; 336 336 editPanel.add(housnumber, c); 337 337 338 338 JLabel seqLabel = new JLabel(tr("House number increment:")); 339 339 c.fill = GridBagConstraints.HORIZONTAL; … … 355 355 c.gridwidth = 1; 356 356 editPanel.add(housenumberChangeSequence, c); 357 357 358 358 return editPanel; 359 359 } … … 372 372 dto.setSaveStreet(streetEnabled.isSelected()); 373 373 dto.setTagStreet(streetRadio.isSelected()); 374 374 375 375 dto.setBuilding((String) building.getSelectedItem()); 376 376 dto.setCity(getAutoCompletingComboBoxValue(city)); … … 381 381 dto.setState(getAutoCompletingComboBoxValue(state)); 382 382 dto.setHousenumberChangeValue(housenumberChangeSequence.getValue()); 383 383 384 384 updateJOSMSelection(selection, dto); 385 385 saveDto(dto); … … 424 424 protected void updateJOSMSelection(OsmPrimitive selection, Dto dto) 425 425 { 426 ArrayList<Command> commands = new ArrayList< Command>();426 ArrayList<Command> commands = new ArrayList<>(); 427 427 428 428 if (dto.isSaveBuilding()) { … … 476 476 ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_STREET, dto.getStreet()); 477 477 commands.add(command); 478 478 479 479 // remove old place-tag 480 480 if (selection.get(TagDialog.TAG_ADDR_PLACE) != null) … … 492 492 ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_PLACE, dto.getStreet()); 493 493 commands.add(command); 494 494 495 495 // remove old place-tag 496 496 if (selection.get(TagDialog.TAG_ADDR_STREET) != null) … … 523 523 * Generates a list of all visible names of highways in order to do autocompletion on the road name. 524 524 */ 525 TreeSet<String> names = new TreeSet< String>();525 TreeSet<String> names = new TreeSet<>(); 526 526 for (OsmPrimitive osm : Main.main.getCurrentDataSet().allNonDeletedPrimitives()) 527 527 { … … 561 561 562 562 } 563 563 564 564 class RadioChangeListener implements ItemListener 565 565 {
Note:
See TracChangeset
for help on using the changeset viewer.