/** * @return the tree node at the specified index */ public Node<E> getTreeNode(int visibleIndex) { return data.get(visibleIndex, VISIBLE_NODES).get(); }
/** {@inheritDoc} */ @Override public T0 get(int index) { return tree.get(index , colors ).get(); }
/** * Get the value at the specified target index. * * @return the value, or {@link ListEvent#UNKNOWN_VALUE} if this index * holds a value that hasn't been buffered. In this case, the value * can be obtained from the source list. */ public E getTargetValue(int targetIndex) { return tree.get(targetIndex, TARGET_INDICES).get(); }
/** * @return <code>true</code> if the children of the node at the specified * index are visible. Nodes with no children may be expanded or not, * this is used to determine whether to show children should any be * added. */ public boolean isExpanded(int visibleIndex) { return data.get(visibleIndex, VISIBLE_NODES).get().expanded; }
/** {@inheritDoc} */ @Override public T0 get(int index) { return tree.get(index , colors ).get(); }
/** * @return <code>true</code> if the children of the node at the specified * index are visible. Nodes with no children may be expanded or not, * this is used to determine whether to show children should any be * added. */ public boolean isExpanded(int visibleIndex) { return data.get(visibleIndex, VISIBLE_NODES).get().expanded; }
/** * @return the tree node at the specified index */ public Node<E> getTreeNode(int visibleIndex) { return data.get(visibleIndex, VISIBLE_NODES).get(); }
/** * Get the value at the specified target index. * * @return the value, or {@link ListEvent#UNKNOWN_VALUE} if this index * holds a value that hasn't been buffered. In this case, the value * can be obtained from the source list. */ public E getTargetValue(int targetIndex) { return tree.get(targetIndex, TARGET_INDICES).get(); }
/** * @return the tree node at the specified index */ public Node<E> getTreeNode(int visibleIndex) { return data.get(visibleIndex, VISIBLE_NODES).get(); }
/** * Get the value at the specified target index. * * @return the value, or {@link ListEvent#UNKNOWN_VALUE} if this index * holds a value that hasn't been buffered. In this case, the value * can be obtained from the source list. */ public E getTargetValue(int targetIndex) { return tree.get(targetIndex, TARGET_INDICES).get(); }
/** * @return <code>true</code> if the children of the node at the specified * index are visible. Nodes with no children may be expanded or not, * this is used to determine whether to show children should any be * added. */ public boolean isExpanded(int visibleIndex) { return data.get(visibleIndex, VISIBLE_NODES).get().expanded; }
/** {@inheritDoc} */ @Override public T0 get(int index) { return tree.get(index , colors ).get(); }
public byte getChangeType(int sourceIndex) { return tree.get(sourceIndex, SOURCE_INDICES).getColor(); }
public byte getChangeType(int sourceIndex) { return tree.get(sourceIndex, SOURCE_INDICES).getColor(); }
public E getSourceValue(int sourceIndex) { return tree.get(sourceIndex, SOURCE_INDICES).get(); }
public E getSourceValue(int sourceIndex) { return tree.get(sourceIndex, SOURCE_INDICES).get(); }
/** * Replaces the node at the specified index, firing all the required * notifications. */ private void replaceAndDetachNode(int sourceIndex, List<Node<E>> nodesToVerify) { Node<E> node = data.get(sourceIndex, REAL_NODES).get(); Node<E> replacement = new Node<E>(node.virtual, new ArrayList<E>(node.path())); replaceNode(node, replacement, true); nodesToVerify.add(replacement); }
/** * Control whether the child elements of the specified node are visible. * * @param expanded <code>true</code> to expand the node, <code>false</code> * to collapse it. */ public void setExpanded(int visibleIndex, boolean expanded) { Node<E> toExpand = data.get(visibleIndex, VISIBLE_NODES).get(); expansionModel.setExpanded(toExpand.getElement(), toExpand.path, expanded); setExpanded(toExpand, expanded); assert(isValid()); }
/** * Control whether the child elements of the specified node are visible. * * @param expanded <code>true</code> to expand the node, <code>false</code> * to collapse it. */ public void setExpanded(int visibleIndex, boolean expanded) { Node<E> toExpand = data.get(visibleIndex, VISIBLE_NODES).get(); expansionModel.setExpanded(toExpand.getElement(), toExpand.path, expanded); setExpanded(toExpand, expanded); assert(isValid()); }
/** * Control whether the child elements of the specified node are visible. * * @param expanded <code>true</code> to expand the node, <code>false</code> * to collapse it. */ public void setExpanded(int visibleIndex, boolean expanded) { Node<E> toExpand = data.get(visibleIndex, VISIBLE_NODES).get(); expansionModel.setExpanded(toExpand.getElement(), toExpand.path, expanded); setExpanded(toExpand, expanded); assert(isValid()); }