Changeset 33306 in osm for applications/editors/josm/plugins/namemanager
- Timestamp:
- 2017-05-12T00:07:28+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/dialog/NameManagerDialog.java
r32549 r33306 13 13 import java.awt.Window; 14 14 import java.awt.event.ActionEvent; 15 import java.awt.event.ActionListener;16 15 import java.awt.event.KeyAdapter; 17 16 import java.awt.event.KeyEvent; … … 109 108 JMenu aboutMenu = new JMenu(tr("About")); 110 109 JMenuItem aboutAppButton = new JMenuItem(tr("About Plugin")); 111 aboutAppButton.addActionListener(new ActionListener() { 112 113 public void actionPerformed(ActionEvent arg0) { 114 String newline = System.getProperty("line.separator"); 115 JOptionPane.showMessageDialog(NameManagerDialog.this, "Authors:" + newline + "Rafal Jachowicz, Marek Strassenburg-Kleciak" 116 + newline + "Consultant:" + newline + "Stefanie Otte" + newline + "Powered by:" + newline 117 + "Harman Becker Automotive Systems GmbH" + newline + "Neusoft Technology Solutions GmbH", tr("About"), 118 JOptionPane.INFORMATION_MESSAGE); 119 } 110 aboutAppButton.addActionListener(e -> { 111 String newline = System.getProperty("line.separator"); 112 JOptionPane.showMessageDialog(NameManagerDialog.this, "Authors:" + newline + "Rafal Jachowicz, Marek Strassenburg-Kleciak" 113 + newline + "Consultant:" + newline + "Stefanie Otte" + newline + "Powered by:" + newline 114 + "Harman Becker Automotive Systems GmbH" + newline + "Neusoft Technology Solutions GmbH", tr("About"), 115 JOptionPane.INFORMATION_MESSAGE); 120 116 }); 121 117 aboutMenu.add(aboutAppButton); … … 283 279 } 284 280 } 285 country.addActionListener(new ActionListener() { 286 public void actionPerformed(ActionEvent e) { 287 String countryName = (String) country.getSelectedItem(); 288 if (CountryDataMemory.getCountryCache().containsKey(countryName)) { 289 Country countryItem = CountryDataMemory.getCountryCache().get(countryName); 290 labelLevel1.setText(" " + countryItem.getLevel1()); 291 if (" n/a".equals(labelLevel1.getText())) { 292 level1.setEnabled(false); 293 } else { 294 level1.setEnabled(true); 295 } 296 labelLevel2.setText(" " + countryItem.getLevel2()); 297 if (" n/a".equals(labelLevel2.getText())) { 298 level2.setEnabled(false); 299 } else { 300 level2.setEnabled(true); 301 } 302 labelLevel3.setText(" " + countryItem.getLevel3()); 303 if (" n/a".equals(labelLevel3.getText())) { 304 level3.setEnabled(false); 305 } else { 306 level3.setEnabled(true); 307 } 308 labelLevel4.setText(" " + countryItem.getLevel4()); 309 if (" n/a".equals(labelLevel4.getText())) { 310 level4.setEnabled(false); 311 } else { 312 level4.setEnabled(true); 313 } 314 labelLevel5.setText(" " + countryItem.getLevel5()); 315 if (" n/a".equals(labelLevel5.getText())) { 316 level5.setEnabled(false); 317 } else { 318 level5.setEnabled(true); 319 } 320 labelLevel6.setText(" " + countryItem.getLevel6()); 321 if (" n/a".equals(labelLevel6.getText())) { 322 level6.setEnabled(false); 323 } else { 324 level6.setEnabled(true); 325 } 281 country.addActionListener(e -> { 282 String countryName1 = (String) country.getSelectedItem(); 283 if (CountryDataMemory.getCountryCache().containsKey(countryName1)) { 284 Country countryItem = CountryDataMemory.getCountryCache().get(countryName1); 285 labelLevel1.setText(" " + countryItem.getLevel1()); 286 if (" n/a".equals(labelLevel1.getText())) { 287 level1.setEnabled(false); 288 } else { 289 level1.setEnabled(true); 290 } 291 labelLevel2.setText(" " + countryItem.getLevel2()); 292 if (" n/a".equals(labelLevel2.getText())) { 293 level2.setEnabled(false); 294 } else { 295 level2.setEnabled(true); 296 } 297 labelLevel3.setText(" " + countryItem.getLevel3()); 298 if (" n/a".equals(labelLevel3.getText())) { 299 level3.setEnabled(false); 300 } else { 301 level3.setEnabled(true); 302 } 303 labelLevel4.setText(" " + countryItem.getLevel4()); 304 if (" n/a".equals(labelLevel4.getText())) { 305 level4.setEnabled(false); 306 } else { 307 level4.setEnabled(true); 308 } 309 labelLevel5.setText(" " + countryItem.getLevel5()); 310 if (" n/a".equals(labelLevel5.getText())) { 311 level5.setEnabled(false); 312 } else { 313 level5.setEnabled(true); 314 } 315 labelLevel6.setText(" " + countryItem.getLevel6()); 316 if (" n/a".equals(labelLevel6.getText())) { 317 level6.setEnabled(false); 318 } else { 319 level6.setEnabled(true); 326 320 } 327 321 } … … 391 385 } 392 386 393 public void actionPerformed(ActionEvent arg0) { 387 @Override 388 public void actionPerformed(ActionEvent e) { 394 389 if (selectedWay != null && waysInsideSelectedArea != null && !waysInsideSelectedArea.isEmpty()) { 395 390 if (tabPanel.getSelectedIndex() == 0) { … … 417 412 } 418 413 414 @Override 419 415 public void actionPerformed(ActionEvent arg0) { 420 416 if (selectedWay != null && waysInsideSelectedArea != null && !waysInsideSelectedArea.isEmpty()) { … … 444 440 } 445 441 442 @Override 446 443 public void actionPerformed(ActionEvent arg0) { 447 444 setVisible(false); … … 461 458 } 462 459 460 @Override 463 461 public void actionPerformed(ActionEvent arg0) { 464 462 if (selectedWay != null && waysInsideSelectedArea != null && !waysInsideSelectedArea.isEmpty()) {
Note:
See TracChangeset
for help on using the changeset viewer.