int (@NotNull Control control, int depth, boolean leaf) { if (depth <= 0 || leaf) return -1; // do not paint control int controlWidth = control.getWidth(); int left = getLeftIndent(controlWidth / 2); int offset = left - controlWidth / 2; return depth > 1 ? (depth - 1) * (left + getRightIndent()) + offset : offset; }