Changeset 8633 in josm
- Timestamp:
- 2015-08-01T19:58:37+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/TestError.java
r8510 r8633 194 194 * @param primitives the list of primitives affected by this error 195 195 */ 196 public void setPrimitives(List< OsmPrimitive> primitives) {196 public void setPrimitives(List<? extends OsmPrimitive> primitives) { 197 197 this.primitives = primitives; 198 198 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
r8540 r8633 338 338 * @return collection of affected primitives, onluy usable ones 339 339 */ 340 protected static FilteredCollection< OsmPrimitive> getAffectedPrimitives(TreePath path) {340 protected static FilteredCollection<? extends OsmPrimitive> getAffectedPrimitives(TreePath path) { 341 341 PseudoCommand c = ((CommandListMutableTreeNode) path.getLastPathComponent()).getCommand(); 342 342 final OsmDataLayer currentLayer = Main.main.getEditLayer(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r8540 r8633 25 25 import javax.swing.event.TreeSelectionListener; 26 26 import javax.swing.tree.DefaultMutableTreeNode; 27 import javax.swing.tree.TreeNode; 27 28 import javax.swing.tree.TreePath; 28 29 … … 197 198 } 198 199 199 Enumeration< DefaultMutableTreeNode> children = node.breadthFirstEnumeration();200 Enumeration<TreeNode> children = node.breadthFirstEnumeration(); 200 201 while (children.hasMoreElements()) { 201 DefaultMutableTreeNode childNode = children.nextElement();202 DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement(); 202 203 if (processedNodes.contains(childNode)) { 203 204 continue; … … 247 248 } 248 249 if (asked == JOptionPane.YES_NO_OPTION) { 249 Enumeration< DefaultMutableTreeNode> children = node.breadthFirstEnumeration();250 Enumeration<TreeNode> children = node.breadthFirstEnumeration(); 250 251 while (children.hasMoreElements()) { 251 DefaultMutableTreeNode childNode = children.nextElement();252 DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement(); 252 253 if (processedNodes.contains(childNode)) { 253 254 continue; … … 272 273 } 273 274 274 Enumeration< DefaultMutableTreeNode> children = node.breadthFirstEnumeration();275 Enumeration<TreeNode> children = node.breadthFirstEnumeration(); 275 276 while (children.hasMoreElements()) { 276 DefaultMutableTreeNode childNode = children.nextElement();277 DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement(); 277 278 if (processedNodes.contains(childNode)) { 278 279 continue; … … 315 316 for (TreePath path : selectedPaths) { 316 317 DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent(); 317 Enumeration< DefaultMutableTreeNode> children = node.breadthFirstEnumeration();318 Enumeration<TreeNode> children = node.breadthFirstEnumeration(); 318 319 while (children.hasMoreElements()) { 319 DefaultMutableTreeNode childNode = children.nextElement();320 DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement(); 320 321 Object nodeInfo = childNode.getUserObject(); 321 322 if (nodeInfo instanceof TestError) { … … 347 348 DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); 348 349 if (lastSelectedNode != null && !lastSelectedNode.equals(node)) { 349 Enumeration< DefaultMutableTreeNode> children = lastSelectedNode.breadthFirstEnumeration();350 Enumeration<TreeNode> children = lastSelectedNode.breadthFirstEnumeration(); 350 351 while (children.hasMoreElements()) { 351 DefaultMutableTreeNode childNode = children.nextElement();352 DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement(); 352 353 Object nodeInfo = childNode.getUserObject(); 353 354 if (nodeInfo instanceof TestError) { … … 362 363 return hasFixes; 363 364 364 Enumeration< DefaultMutableTreeNode> children = node.breadthFirstEnumeration();365 Enumeration<TreeNode> children = node.breadthFirstEnumeration(); 365 366 while (children.hasMoreElements()) { 366 DefaultMutableTreeNode childNode = children.nextElement();367 DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement(); 367 368 Object nodeInfo = childNode.getUserObject(); 368 369 if (nodeInfo instanceof TestError) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
r8510 r8633 21 21 import javax.swing.tree.DefaultMutableTreeNode; 22 22 import javax.swing.tree.DefaultTreeModel; 23 import javax.swing.tree.TreeNode; 23 24 import javax.swing.tree.TreePath; 24 25 import javax.swing.tree.TreeSelectionModel; … … 68 69 * that refer to one of the primitives in the filter. 69 70 */ 70 private transient Set< OsmPrimitive> filter = null;71 private transient Set<? extends OsmPrimitive> filter = null; 71 72 72 73 /** a counter to check if tree has been rebuild */ … … 345 346 * @return the list of primitives used for filtering 346 347 */ 347 public Set< OsmPrimitive> getFilter() {348 public Set<? extends OsmPrimitive> getFilter() { 348 349 return filter; 349 350 } … … 353 354 * @param filter the list of primitives used for filtering 354 355 */ 355 public void setFilter(Set< OsmPrimitive> filter) {356 public void setFilter(Set<? extends OsmPrimitive> filter) { 356 357 if (filter != null && filter.isEmpty()) { 357 358 this.filter = null; … … 380 381 381 382 int row = 0; 382 Enumeration< DefaultMutableTreeNode> children = root.breadthFirstEnumeration();383 Enumeration<TreeNode> children = root.breadthFirstEnumeration(); 383 384 while (children.hasMoreElements()) { 384 385 children.nextElement(); -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
r8510 r8633 181 181 } 182 182 183 Collection< PrimitiveId> toLoad = Utils.filter(primitives, unloadedHistoryPredicate);183 Collection<? extends PrimitiveId> toLoad = Utils.filter(primitives, unloadedHistoryPredicate); 184 184 if (!toLoad.isEmpty()) { 185 185 HistoryLoadTask task = new HistoryLoadTask(); -
trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java
r8392 r8633 11 11 import javax.swing.Icon; 12 12 import javax.swing.tree.DefaultMutableTreeNode; 13 import javax.swing.tree.TreeNode; 13 14 14 15 import org.openstreetmap.josm.Main; … … 69 70 DefaultMutableTreeNode severity = (DefaultMutableTreeNode) root.getLastChild(); 70 71 while (severity != null) { 71 Enumeration< DefaultMutableTreeNode> errorMessages = severity.breadthFirstEnumeration();72 Enumeration<TreeNode> errorMessages = severity.breadthFirstEnumeration(); 72 73 while (errorMessages.hasMoreElements()) { 73 Object tn = errorMessages.nextElement().getUserObject();74 Object tn = ((DefaultMutableTreeNode) errorMessages.nextElement()).getUserObject(); 74 75 if (tn instanceof TestError) { 75 76 paintVisitor.visit((TestError) tn);
Note:
See TracChangeset
for help on using the changeset viewer.