Interface ITreeContentProvider

All Superinterfaces:
IAddressableTableContentProvider, IContentProvider, ITableContentProvider
All Known Subinterfaces:
ISelectableTreeContentProvider
All Known Implementing Classes:
BoundChildrenTreeContentProvider, FilterableListTreeContentProvider, LazyNodeTreeContentProvider, ListTreeContentProvider, NodeTreeContentProvider, TableTreeContentProvider, XMLTreeContentProvider

public interface ITreeContentProvider extends IAddressableTableContentProvider
Tree content provider. Must always iterate over tree data source in depth-first order. May have multiple roots (rows at depth zero).
  • Method Details

    • getRootIds

      Iterator<String> getRootIds()
      String ids of root rows, in order. Empty iterator (not null) if tree is empty.
    • getDepth

      int getDepth()
      Depth of current row. Zero (0) for root.
    • getParentId

      String getParentId()
      Id of parent row. Null for root. Parent depth must be exactly one less than current depth.
    • getChildIds

      Iterator<String> getChildIds()
      String ids of child rows, in order. Empty iterator (not null) if row has no children. Child depth must be exactly one more than current depth.
    • getHasChildren

      boolean getHasChildren()
      True if current row has children.
    • isFirstChild

      boolean isFirstChild()
      True if current row is first child of parent (not whether or not current row is first row in tree). Also true for first root in tree (child with no parent is a root).
    • isLastChild

      boolean isLastChild()
      True if current row is last child of parent (not whether or not current row is last row in tree). Also true for last root in tree (child with no parent is a root).
    • getLastChildAncestors

      boolean[] getLastChildAncestors()
      isLastChild() value of ancestors to the current row, from the root to the current row's parent. Zero-length array (non-null) for root.
    • isOpen

      boolean isOpen()
      True if current row is open.
    • setOpen

      void setOpen(boolean open)
      True if current row is open.
    • isVisible

      boolean isVisible()
      True if ancestors of current row are all open. Root is always visible.
    • getOpenIds

      Collection<String> getOpenIds()
      Collection of String ids of open rows. May be empty or contain non-existent ids; never null, never contains null.
    • setOpenIds

      void setOpenIds(Collection<String> ids)
      Collection of String ids of open rows. May be empty or contain non-existent ids; never null, never contains null.
    • getUseUnopenModel

      boolean getUseUnopenModel()
      True if it's more effecient to use the un-open model (getUnopenIds()) rather than the open model (getOpenIds()).
    • getUnopenIds

      Collection<String> getUnopenIds()
      Collection of String ids of un-open rows (all other rows are open implicitly). May be empty or contain non-existent ids; never null, never contains null.
    • setUnopenIds

      void setUnopenIds(Collection<String> ids)
      Collection of String ids of un-open rows (all other rows are open implicitly). May be empty or contain non-existent ids; never null, never contains null.