Changeset 24175 in osm for applications/editors/josm/plugins/FixAddresses/src/org
- Timestamp:
- 2010-11-10T00:54:03+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMAddress.java
r24166 r24175 245 245 public boolean hasHouseNumber() { 246 246 return TagUtils.hasAddrHousenumberTag(osmObject) || isPartOfInterpolation; 247 } 248 249 /* (non-Javadoc) 250 * @see org.openstreetmap.josm.plugins.fixAddresses.OSMEntityBase#getName() 251 */ 252 public String getName() { 253 String name = TagUtils.getNameValue(osmObject); 254 if (!StringUtils.isNullOrEmpty(name)) { 255 return TagUtils.getAddrHousenameValue(osmObject); 256 } 257 258 return ""; 247 259 } 248 260 -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditDialog.java
r24114 r24175 41 41 import javax.swing.event.ListSelectionEvent; 42 42 import javax.swing.event.ListSelectionListener; 43 import javax.swing.table.JTableHeader; 43 44 import javax.swing.table.TableModel; 44 45 … … 50 51 import org.openstreetmap.josm.gui.SideButton; 51 52 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 52 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress;53 53 import org.openstreetmap.josm.plugins.fixAddresses.IAddressEditContainerListener; 54 54 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 55 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 55 56 import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet; 56 57 import org.openstreetmap.josm.plugins.fixAddresses.StringUtils; … … 147 148 148 149 /* Panel for unresolved addresses table */ 149 JPanel unresolvedPanel = new JPanel(new BorderLayout()); 150 unresolvedTable = new JTable(new UnresolvedAddressesTableModel(editContainer)); 150 JPanel unresolvedPanel = new JPanel(new BorderLayout()); 151 UnresolvedAddressesTableModel uaModel = new UnresolvedAddressesTableModel(editContainer); 152 unresolvedTable = new JTable(uaModel); 151 153 unresolvedTable.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 152 154 unresolvedTable.getSelectionModel().addListSelectionListener(this); 153 155 unresolvedTable.getSelectionModel().addListSelectionListener(new IncompleteAddressListener()); 154 unresolvedTable.addMouseListener(applyAllGuessesAction); 156 unresolvedTable.addMouseListener(applyAllGuessesAction); 157 158 JTableHeader header = unresolvedTable.getTableHeader(); 159 header.addMouseListener(uaModel.new ColumnListener(unresolvedTable)); 155 160 156 161 JScrollPane scroll2 = new JScrollPane(unresolvedTable); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/UnresolvedAddressesTableModel.java
r24174 r24175 34 34 35 35 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 36 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 36 37 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 37 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;38 import org.openstreetmap.josm.plugins.fixAddresses.StringUtils;39 import org.openstreetmap.josm.plugins.fixAddresses.TagUtils;40 import org.openstreetmap.josm.plugins.fixAddresses.gui.AddressEditTableModel.ColumnSorter;41 import org.openstreetmap.josm.plugins.fixAddresses.gui.IncompleteAddressesTableModel.IncompleteAddressModelSorter;42 38 43 39 /** … … 127 123 return aNode.getPostCode(); 128 124 case 4: 129 String name = aNode.getName(); 130 if (!StringUtils.isNullOrEmpty(name)) { 131 // TODO: Provide a getter/setter for this? 132 return TagUtils.getAddrHousenameValue(aNode.getOsmObject()); 133 } 134 return ""; 125 return aNode.getName(); 135 126 default: 136 127 throw new RuntimeException("Invalid column index: " + column); … … 236 227 cc = arg0.getPostCode().compareTo(arg1.getPostCode()); 237 228 break; 229 case 4: 230 cc = arg0.getName().compareTo(arg1.getName()); 231 break; 238 232 default: 239 233 throw new RuntimeException("Invalid column index: "
Note:
See TracChangeset
for help on using the changeset viewer.