Changeset 23921 in osm for applications/editors
- Timestamp:
- 2010-10-30T17:53:36+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/AddressEdit
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/AddressEditContainer.java
r23915 r23921 285 285 return unresolvedAddresses != null ? unresolvedAddresses.size() : 0; 286 286 } 287 288 /** 289 * Gets the number of guessed tags. 290 * @return 291 */ 292 public int getNumberOfGuesses() { 293 int sum = 0; 294 295 for (AddressNode aNode : getAllAddressesToFix()) { 296 if (aNode.hasGuesses()) { 297 sum++; 298 } 299 } 300 return sum; 301 } 302 303 /** 304 * Gets all (incomplete and/or unresolved) address nodes to fix. 305 * @return 306 */ 307 public List<AddressNode> getAllAddressesToFix() { 308 List<AddressNode> all = new ArrayList<AddressNode>(incompleteAddresses); 309 310 for (AddressNode aNode : unresolvedAddresses) { 311 if (!all.contains(aNode)) { 312 all.add(aNode); 313 } 314 } 315 316 return all; 317 } 287 318 288 319 /** -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/AddressNode.java
r23916 r23921 81 81 return !StringUtils.isNullOrEmpty(guessedStreetName); 82 82 } 83 84 /** 85 * Returns true, if this instance has guesses regarding address tags. 86 * @return 87 */ 88 public boolean hasGuesses() { 89 return hasGuessedStreetName(); // to be extended later 90 } 91 92 /** 93 * Applies all guessed tags for this node. 94 */ 95 public void applyAllGuesses() { 96 if (hasGuessedStreetName()) applyGuessedStreet(); 97 } 83 98 84 99 /** -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AddressEditDialog.java
r23919 r23921 71 71 /* Actions */ 72 72 private AssignAddressToStreetAction resolveAction = new AssignAddressToStreetAction(); 73 private ApplyAllGuessesAction applyAllGuessesAction = new ApplyAllGuessesAction(); 73 74 private GuessAddressDataAction guessAddressAction = new GuessAddressDataAction(); 74 75 75 76 private AbstractAddressEditAction[] actions = new AbstractAddressEditAction[] { 76 77 resolveAction, 77 guessAddressAction 78 guessAddressAction, 79 applyAllGuessesAction 78 80 }; 79 81 private JLabel streetLabel; … … 125 127 126 128 JPanel unresolvedButtons = new JPanel(new FlowLayout()); 127 SideButton assign = new SideButton(resolveAction , "assignstreet_24");129 SideButton assign = new SideButton(resolveAction); 128 130 unresolvedButtons.add(assign); 129 SideButton guess = new SideButton(guessAddressAction , "guessstreets_24");131 SideButton guess = new SideButton(guessAddressAction); 130 132 unresolvedButtons.add(guess); 133 SideButton applyAllGuesses = new SideButton(applyAllGuessesAction); 134 unresolvedButtons.add(applyAllGuesses); 131 135 unresolvedPanel.add(unresolvedButtons, BorderLayout.SOUTH); 132 136 -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AssignAddressToStreetAction.java
r23915 r23921 23 23 24 24 public AssignAddressToStreetAction() { 25 super(tr("Assign address to street") );25 super(tr("Assign address to street"), "assignstreet_24", "Assign the selected address(es) to the selected street."); 26 26 } 27 27
Note:
See TracChangeset
for help on using the changeset viewer.