src/share/classes/javax/swing/tree/AbstractLayoutCache.java

Print this page

        

@@ -226,14 +226,14 @@
             else {
                 firstPath = getPathClosestTo(bounds.x, bounds.y);
                 endY = bounds.height + bounds.y;
             }
 
-            Enumeration   paths = getVisiblePathsFrom(firstPath);
+            Enumeration<TreePath> paths = getVisiblePathsFrom(firstPath);
 
             if(paths != null && paths.hasMoreElements()) {
-                Rectangle   pBounds = getBounds((TreePath)paths.nextElement(),
+                Rectangle   pBounds = getBounds(paths.nextElement(),
                                                 null);
                 int         width;
 
                 if(pBounds != null) {
                     width = pBounds.x + pBounds.width;

@@ -242,11 +242,11 @@
                     }
                 }
                 else
                     width = 0;
                 while (pBounds != null && paths.hasMoreElements()) {
-                    pBounds = getBounds((TreePath)paths.nextElement(),
+                    pBounds = getBounds(paths.nextElement(),
                                         pBounds);
                     if (pBounds != null && pBounds.y < endY) {
                         width = Math.max(width, pBounds.x + pBounds.width);
                     }
                     else {