@Test public void testSetComparator() { BasicEventList<String> source = new BasicEventList<>(); source.add("ABCd"); source.add("ABCe"); source.add("ABCF"); source.add("ABCG"); SortedList<String> sortedSource = new SortedList<>(source, null); TreeList<String> treeList = new TreeList<>(sortedSource, COMPRESSED_CHARACTER_TREE_FORMAT, TreeList.<String>nodesStartExpanded()); assertTreeStructure(treeList, new String[] { "A", "AB", "ABC", "ABCd", "ABCe", "ABCF", "ABCG", }); sortedSource.setComparator(GlazedLists.reverseComparator()); assertTreeStructure(treeList, new String[] { "A", "AB", "ABC", "ABCe", "ABCd", "ABCF", "ABCG", }); }
@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; }