int paintRecursive(Graphics g, int indentation, int descent, int childNumber,
int paintRecursive(Graphics g, int indentation, int descent,
  int paintRecursive(Graphics g, int indentation, int descent, int childNumber,                     int depth, JTree tree, TreeModel mod, Object curr)  {    Rectangle clip = tree.getVisibleRect();    if (indentation > clip.x + clip.width + rightChildIndent        || descent > clip.y + clip.height + getRowHeight())      return descent;    int halfHeight = getRowHeight() / 2;    int halfWidth = rightChildIndent / 2;    int y0 = descent + halfHeight;    int heightOfLine = descent + halfHeight;    boolean isRootVisible = tree.isRootVisible();    if (mod.isLeaf(curr))      {        paintNode(g, indentation + 4, descent, tree, curr, true);        descent += getRowHeight();      }    else      {        if (depth > 0 || isRootVisible)          {            paintNode(g, indentation + 4, descent, tree, curr, false);            descent += getRowHeight();            y0 += halfHeight;          }        int max = 0;        if (!mod.isLeaf(curr))          max = mod.getChildCount(curr);        if (tree.isExpanded(new TreePath(getPathToRoot(curr, 0))))          {            for (int i = 0; i < max; i++)              {                int indent = indentation + rightChildIndent;                if (!isRootVisible && depth == 0)                  indent = 0;                else if ((!isRootVisible && !curr.equals(mod.getRoot()))                         || isRootVisible)                  {                    g.setColor(getHashColor());                    heightOfLine = descent + halfHeight;                    paintHorizontalLine(g, (JComponent) tree, heightOfLine,                       indentation + halfWidth, indentation + rightChildIndent);                  }                descent = paintRecursive(g, indent, descent, i, depth + 1,                                         tree, mod, mod.getChild(curr, i));              }          }      }    if (tree.isExpanded(new TreePath(getPathToRoot(curr, 0))))      if (y0 != heightOfLine && !mod.isLeaf(curr)          && mod.getChildCount(curr) > 0)        {          g.setColor(getHashColor());          paintVerticalLine(g, (JComponent) tree, indentation + halfWidth,                             y0, heightOfLine);        }    return descent;  }