if (tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) { if (!node.equals(mod.getRoot())) ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h);
if (!node.equals(mod.getRoot())) icon.paintIcon(tree, g, indentation - rightChildIndent - 3, h);  if (tree.isExpanded(path)) {
   int paintControlIcons(Graphics g, int indentation, int descent,                        int childNumber, int depth, JTree tree, TreeModel mod,                        Object node)   {      int h = descent;      int rowHeight = getRowHeight();    Icon ei = UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon");    Icon ci = UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon");      Rectangle clip = g.getClipBounds();      if (indentation > clip.x + clip.width + rightChildIndent            || descent > clip.y + clip.height + getRowHeight())         return descent;            if (mod.isLeaf(node))         descent += rowHeight;      else       {         if (depth > 0 || tree.isRootVisible())            descent += rowHeight;                 int max = 0;        if (!mod.isLeaf(node))          max = mod.getChildCount(node);        if (tree.isExpanded(new TreePath(getPathToRoot(node, 0))))         {            if (!node.equals(mod.getRoot()))              ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h);                        for (int i = 0; i < max; i++)            {               int indent = indentation + rightChildIndent;               if (depth == 0 && !tree.isRootVisible())                  indent = -1;                               descent = paintControlIcons(g, indent, descent, i, depth + 1,                                            tree, mod, mod.getChild(node, i));            }         }         else if (!node.equals(mod.getRoot()))          ci.paintIcon(tree, g, indentation - rightChildIndent - 3,                  descent - getRowHeight());      }          return descent;  }