Changeset 27609 in osm
- Timestamp:
- 2012-01-23T21:25:31+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java
r27594 r27609 1 1 package org.openstreetmap.josm.plugins.czechaddress.gui; 2 2 3 import java.util.Set; 4 import org.openstreetmap.josm.plugins.czechaddress.gui.utils.HalfCookedListModel; 5 import org.openstreetmap.josm.plugins.czechaddress.gui.utils.HalfCookedComboBoxModel; 6 import org.openstreetmap.josm.plugins.czechaddress.StringUtils; 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 7 5 import java.awt.Component; 8 6 import java.awt.Font; … … 14 12 import java.util.Collections; 15 13 import java.util.List; 14 16 15 import javax.swing.DefaultListCellRenderer; 17 16 import javax.swing.ImageIcon; 18 17 import javax.swing.JList; 18 19 19 import org.openstreetmap.josm.data.SelectionChangedListener; 20 20 import org.openstreetmap.josm.data.osm.DataSet; … … 24 24 import org.openstreetmap.josm.plugins.czechaddress.MapUtils; 25 25 import org.openstreetmap.josm.plugins.czechaddress.StatusListener; 26 import org.openstreetmap.josm.plugins.czechaddress.StringUtils; 26 27 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.AddressElement; 27 28 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.ElementWithHouses; … … 29 30 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.House; 30 31 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.Street; 32 import org.openstreetmap.josm.plugins.czechaddress.gui.utils.HalfCookedComboBoxModel; 33 import org.openstreetmap.josm.plugins.czechaddress.gui.utils.HalfCookedListModel; 31 34 import org.openstreetmap.josm.plugins.czechaddress.intelligence.Reasoner; 32 35 import org.openstreetmap.josm.plugins.czechaddress.intelligence.ReasonerListener; … … 81 84 } 82 85 83 public void pluginStatusChanged(int message) { 86 @Override 87 public void pluginStatusChanged(int message) { 84 88 85 89 if (message == MESSAGE_DATABASE_LOADED) { … … 195 199 196 200 public boolean selectionListenerActivated = true; 197 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 201 @Override 202 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 198 203 199 204 if (!selectionListenerActivated) return; … … 260 265 houseList.setModel(new javax.swing.AbstractListModel() { 261 266 String[] strings = { " " }; 262 public int getSize() { return strings.length; } 263 public Object getElementAt(int i) { return strings[i]; } 267 @Override 268 public int getSize() { return strings.length; } 269 @Override 270 public Object getElementAt(int i) { return strings[i]; } 264 271 }); 265 272 houseList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); … … 267 274 houseList.setFocusable(false); 268 275 houseList.addMouseListener(new java.awt.event.MouseAdapter() { 269 public void mouseClicked(java.awt.event.MouseEvent evt) { 276 @Override 277 public void mouseClicked(java.awt.event.MouseEvent evt) { 270 278 houseListClicked(evt); 271 279 } … … 280 288 relocateButton.setEnabled(false); 281 289 relocateButton.addActionListener(new java.awt.event.ActionListener() { 282 public void actionPerformed(java.awt.event.ActionEvent evt) { 290 @Override 291 public void actionPerformed(java.awt.event.ActionEvent evt) { 283 292 relocateButtonActionPerformed(evt); 284 293 } … … 342 351 // End of variables declaration//GEN-END:variables 343 352 344 public void elementChanged(AddressElement elem) { 353 @Override 354 public void elementChanged(AddressElement elem) { 345 355 houseModel.notifyAllListeners(); 346 356 } 347 public void primitiveChanged(OsmPrimitive prim) {} 348 public void resonerReseted() {} 357 @Override 358 public void primitiveChanged(OsmPrimitive prim) {} 359 @Override 360 public void resonerReseted() {} 349 361 350 362 //============================================================================== … … 427 439 } 428 440 429 public void resonerReseted() { houses.clear(); } 430 public void primitiveChanged(OsmPrimitive prim) {} 431 public void elementChanged(AddressElement elem) { 441 @Override 442 public void resonerReseted() { houses.clear(); } 443 @Override 444 public void primitiveChanged(OsmPrimitive prim) {} 445 @Override 446 public void elementChanged(AddressElement elem) { 432 447 if (!(elem instanceof House)) return; 433 448 House house = (House) elem; … … 460 475 } 461 476 462 public int getSize() { 477 @Override 478 public int getSize() { 463 479 if (parent == null) return 0; 464 480 return parent.getStreets().size() + metaElem.size(); … … 476 492 } 477 493 478 public Object getElementAt(int index) { 494 @Override 495 public Object getElementAt(int index) { 479 496 if (parent == null) return null; 480 497 … … 490 507 } 491 508 492 public void setSelectedItem(Object anItem) { 509 @Override 510 public void setSelectedItem(Object anItem) { 493 511 assert anItem instanceof ElementWithHouses; 494 512 selected = (ElementWithHouses) anItem; … … 496 514 } 497 515 498 public Object getSelectedItem() { 516 @Override 517 public Object getSelectedItem() { 499 518 return selected; 500 519 } … … 510 529 } 511 530 512 public int getSize() { 531 @Override 532 public int getSize() { 513 533 if (streetComboBox.getSelectedItem() == null) return 0; 514 534 ElementWithHouses selected … … 528 548 } 529 549 530 public Object getElementAt(int index) { 550 @Override 551 public Object getElementAt(int index) { 531 552 return getHouseAt(index); 532 553 } 533 554 534 public void primitiveChanged(OsmPrimitive prim) {} 535 public void elementChanged(AddressElement elem) { 555 @Override 556 public void primitiveChanged(OsmPrimitive prim) {} 557 @Override 558 public void elementChanged(AddressElement elem) { 536 559 notifyAllListeners(); 537 560 } 538 561 539 public void resonerReseted() { 562 @Override 563 public void resonerReseted() { 540 564 notifyAllListeners(); 541 565 }
Note:
See TracChangeset
for help on using the changeset viewer.