if (parent != null)
boolean paintLine; if (isRootVisible()) paintLine = parent != null; else paintLine = parent != null && parent.getPathCount() > 1; if (paintLine)
  protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds,                                        Insets insets, TreePath path)  {    Rectangle bounds = getPathBounds(tree, path);    TreePath parent = path.getParentPath();    if (parent != null)          {        Rectangle parentBounds = getPathBounds(tree, parent);        paintVerticalLine(g, tree, parentBounds.x + 2* gap,                           parentBounds.y + parentBounds.height / 2,                          bounds.y + bounds.height / 2);      }  }