/[classpath]/classpath/javax/swing/plaf/basic/BasicTreeUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicTreeUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.108 by abalkiss, Tue Nov 8 20:35:44 2005 UTC revision 1.109 by langel, Tue Nov 8 20:59:04 2005 UTC
# Line 3776  public class BasicTreeUI extends TreeUI Line 3776  public class BasicTreeUI extends TreeUI
3776                dtcr = createDefaultCellRenderer();                dtcr = createDefaultCellRenderer();
3777                            
3778              Component c = dtcr.getTreeCellRendererComponent(tree, node,              Component c = dtcr.getTreeCellRendererComponent(tree, node,
3779                                       selected, isExpanded, isLeaf, row, true);                                       selected, isExpanded, isLeaf, row, tree.hasFocus());
3780              rendererPane.paintComponent(g, c, c.getParent(), bounds);              rendererPane.paintComponent(g, c, c.getParent(), bounds);
3781            }            }
3782        }        }
# Line 3850  public class BasicTreeUI extends TreeUI Line 3850  public class BasicTreeUI extends TreeUI
3850            }            }
3851          while (next != null && !tree.isVisible(new TreePath(getPathToRoot(next, 0))));          while (next != null && !tree.isVisible(new TreePath(getPathToRoot(next, 0))));
3852        }        }
3853    
3854      currentVisiblePath = current;      currentVisiblePath = current;
3855      if (currentVisiblePath != null)      if (currentVisiblePath != null)
3856        tree.setVisibleRowCount(currentVisiblePath.getPathCount());        tree.setVisibleRowCount(currentVisiblePath.getPathCount());
3857      else      else tree.setVisibleRowCount(0);
3858        tree.setVisibleRowCount(0);  
       
3859      if (tree.getSelectionModel() != null && tree.getSelectionCount() == 0 &&      if (tree.getSelectionModel() != null && tree.getSelectionCount() == 0 &&
3860          currentVisiblePath != null)          currentVisiblePath != null)
3861          selectPath(tree, new TreePath(currentVisiblePath.getPathComponent(0)));        selectPath(tree, new TreePath(getPathToRoot(currentVisiblePath.
3862                                                      getPathComponent(0), 0)));
3863    }    }
3864        
3865    /**    /**

Legend:
Removed from v.1.108  
changed lines
  Added in v.1.109

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26