private void build(int depth, int indexAtRow, Integer idParent, boolean isLeft) {
        DepthRow depthRow = depthManager.getDepth(depth);
        if (depthRow != null) {
            DepthRowNode node = depthRow.getNodeElement(indexAtRow);
            if (node != null && node.containsElement()) {
                ListTreeInfo info = new ListTreeInfo(node.getElementId(), depth, indexAtRow);
                int index = 0;
                if (indexes.containsKey(idParent)) {
                    int indexParent = indexes.get(idParent);
                    index = indexParent;
                    if (isLeft) {
                        changeIndexes(indexParent);
                    } else {
                        index++;
                        changeIndexes(indexParent + 1);
                    }

                    if (index <= indexRoot) {
                        indexRoot++;
                    }
                }
                indexes.put(node.getElementId(), index);


                this.listTree.add(index, info);
                int leftChildIndex = BinaryTreeHelper.getLeftChildIndex(indexAtRow);
                build(depth + 1, leftChildIndex, node.getElementId(), true);
                build(depth + 1, leftChildIndex + 1, node.getElementId(), false);
            }
        }
    }