@Test public void testInsertMultipleParents() { TransactionList<String> source = new TransactionList<>(new BasicEventList<String>()); TreeList<String> treeList = new TreeList<>(source, UNCOMPRESSED_CHARACTER_TREE_FORMAT, TreeList.<String>nodesStartExpanded()); ListConsistencyListener<String> listConsistencyListener = ListConsistencyListener.install(treeList); listConsistencyListener.setPreviousElementTracked(false); source.beginEvent(false); source.add("ABC"); source.add("ABD"); source.add("ABE"); source.commitEvent(); source.beginEvent(); source.addAll(0, Arrays.asList("A", "AB")); source.addAll(3, Arrays.asList("A", "AB")); source.commitEvent(); assertTreeStructure(treeList, new String[] { "A", "AB", "ABC", "A", "AB", "ABD", "ABE", }); }
@SuppressWarnings("unchecked") public static final <E> ExpansionModel<E> nodesStartExpanded() { return NODES_START_EXPANDED; }
TreeList extends TransformedList<TreeList.Node<E>,E> { @SuppressWarnings("unchecked") public static final <E> ExpansionModel<E> nodesStartExpanded() { return NODES_START_EXPANDED; } }
TreeList extends TransformedList<TreeList.Node<E>,E> { @SuppressWarnings("unchecked") public static final <E> ExpansionModel<E> nodesStartExpanded() { return NODES_START_EXPANDED; } TreeList(EventList<E> source, Format<E> format, ExpansionModel<E> expansionModel); private  TreeList(InitializationData<E> initializationData); @Deprecated  TreeList(EventList<E> source, Format<E> format); }
TreeList extends TransformedList<TreeList.Node<E>,E> { @SuppressWarnings("unchecked") public static final <E> ExpansionModel<E> nodesStartExpanded() { return NODES_START_EXPANDED; } TreeList(EventList<E> source, Format<E> format, ExpansionModel<E> expansionModel); private  TreeList(InitializationData<E> initializationData); @Deprecated  TreeList(EventList<E> source, Format<E> format); @SuppressWarnings("unchecked") static final ExpansionModel<E> nodesStartExpanded(); @SuppressWarnings("unchecked") static final ExpansionModel<E> nodesStartCollapsed(); EventList<Node<E>> getNodesList(); int depth(int visibleIndex); int subtreeSize(int visibleIndex, boolean includeCollapsed); @Override int size(); @Override E get(int visibleIndex); @Override E remove(int visibleIndex); Node<E> getTreeNode(int visibleIndex); boolean hasChildren(int visibleIndex); void setTreeFormat(Format<E> treeFormat); List<Node<E>> getRoots(); boolean getAllowsChildren(int visibleIndex); boolean isExpanded(int visibleIndex); void setExpanded(int visibleIndex, boolean expanded); void toggleExpanded(int visibleIndex); @Override void listChanged(ListEvent<Node<E>> listChanges); @Override void dispose(); }
TreeList extends TransformedList<TreeList.Node<E>,E> { @SuppressWarnings("unchecked") public static final <E> ExpansionModel<E> nodesStartExpanded() { return NODES_START_EXPANDED; } TreeList(EventList<E> source, Format<E> format, ExpansionModel<E> expansionModel); private  TreeList(InitializationData<E> initializationData); @Deprecated  TreeList(EventList<E> source, Format<E> format); @SuppressWarnings("unchecked") static final ExpansionModel<E> nodesStartExpanded(); @SuppressWarnings("unchecked") static final ExpansionModel<E> nodesStartCollapsed(); EventList<Node<E>> getNodesList(); int depth(int visibleIndex); int subtreeSize(int visibleIndex, boolean includeCollapsed); @Override int size(); @Override E get(int visibleIndex); @Override E remove(int visibleIndex); Node<E> getTreeNode(int visibleIndex); boolean hasChildren(int visibleIndex); void setTreeFormat(Format<E> treeFormat); List<Node<E>> getRoots(); boolean getAllowsChildren(int visibleIndex); boolean isExpanded(int visibleIndex); void setExpanded(int visibleIndex, boolean expanded); void toggleExpanded(int visibleIndex); @Override void listChanged(ListEvent<Node<E>> listChanges); @Override void dispose(); static final ExpansionModel NODES_START_EXPANDED; static final ExpansionModel NODES_START_COLLAPSED; }