/[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.59 by langel, Wed Aug 10 15:04:15 2005 UTC revision 1.60 by langel, Fri Aug 12 17:56:48 2005 UTC
# Line 2620  public class BasicTreeUI Line 2620  public class BasicTreeUI
2620        }        }
2621    
2622      if (!mod.isLeaf(startNode)      if (!mod.isLeaf(startNode)
2623          && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))))          && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0)))
2624            && mod.getChildCount(startNode) > 0)
2625        {        {
2626          Object child = mod.getChild(startNode, 0);          Object child = mod.getChild(startNode, 0);
2627          if (child != null)          if (child != null)
# Line 2711  public class BasicTreeUI Line 2712  public class BasicTreeUI
2712          int max = mod.getChildCount(curr);          int max = mod.getChildCount(curr);
2713          if (tree.isExpanded(new TreePath(getPathToRoot(curr, 0))))          if (tree.isExpanded(new TreePath(getPathToRoot(curr, 0))))
2714            {            {
2715              for (int i = 0; i < max; ++i)              for (int i = 0; i < max; i++)
2716                {                {
2717                  int indent = indentation + rightChildIndent;                  int indent = indentation + rightChildIndent;
2718                  if (!isRootVisible && depth == 0)                  if (!isRootVisible && depth == 0)
# Line 2783  public class BasicTreeUI Line 2784  public class BasicTreeUI
2784              if (!node.equals(mod.getRoot()))              if (!node.equals(mod.getRoot()))
2785                ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h);                ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h);
2786    
2787              for (int i = 0; i < max; ++i)              for (int i = 0; i < max; i++)
2788                {                {
2789                  int indent = indentation + rightChildIndent;                  int indent = indentation + rightChildIndent;
2790                  if (depth == 0 && !tree.isRootVisible())                  if (depth == 0 && !tree.isRootVisible())
# Line 2930  public class BasicTreeUI Line 2931  public class BasicTreeUI
2931    Object getNextNode(Object curr)    Object getNextNode(Object curr)
2932    {    {
2933      TreeModel mod = tree.getModel();      TreeModel mod = tree.getModel();
2934      if (mod.getChildCount(curr) != 0)      if (mod.getChildCount(curr) > 0)
2935        return mod.getChild(curr, 0);        return mod.getChild(curr, 0);
2936    
2937      Object node = curr;      Object node = curr;
# Line 3013  public class BasicTreeUI Line 3014  public class BasicTreeUI
3014    
3015      int index = mod.getIndexOfChild(parent, node) - 1;      int index = mod.getIndexOfChild(parent, node) - 1;
3016    
3017      if (index < 0)      if (index < 0 || index >= mod.getChildCount(parent))
3018        return null;        return null;
3019    
3020      return mod.getChild(parent, index);      return mod.getChild(parent, index);

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60

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