Class BreadcrumbTreeAdapterSelector.TreeContentProvider

java.lang.Object
org.pushingpixels.radiance.component.api.bcb.BreadcrumbBarContentProvider<T>
org.pushingpixels.radiance.component.api.bcb.core.BreadcrumbTreeAdapterSelector.TreeContentProvider
Enclosing class:
BreadcrumbTreeAdapterSelector<T>

private class BreadcrumbTreeAdapterSelector.TreeContentProvider extends BreadcrumbBarContentProvider<T>
Tree-adapter specific implementation of the BreadcrumbBarContentProvider.
  • Field Details

    • treeModel

      private TreeModel treeModel
      The corresponding tree model.
    • treeAdapter

      The corresponding tree adapter. Can not be null.
    • isRootVisible

      private boolean isRootVisible
      If true, the first selector shows the tree root node. If false, the first selector shows the tree root child nodes.
  • Constructor Details

    • TreeContentProvider

      private TreeContentProvider(TreeModel treeModel, BreadcrumbTreeAdapterSelector.TreeAdapter<T> treeAdapter, boolean isRootVisible)
      Creates the callback.
      Parameters:
      treeModel - The corresponding tree model.
      treeAdapter - The corresponding tree adapter. Can not be null.
      isRootVisible - If true, the first selector shows the tree root node. If false, the first selector shows the tree root child nodes.
  • Method Details

    • getPathChoices

      public List<BreadcrumbItem<T>> getPathChoices(List<BreadcrumbItem<T>> path)
      Description copied from class: BreadcrumbBarContentProvider
      Returns the choice elements that correspond to the specified path. If the path is empty, null should be returned. If path is null, the "root" elements should be returned
      Overrides:
      getPathChoices in class BreadcrumbBarContentProvider<T>
      Parameters:
      path - Breadcrumb bar path.
      Returns:
      The choice elements that correspond to the specified path
    • getLeaves

      public List<BreadcrumbItem<T>> getLeaves(List<BreadcrumbItem<T>> path)
      Description copied from class: BreadcrumbBarContentProvider
      Returns the leaf elements that correspond to the specified path. If the path is empty, null should be returned. If path is null, leaf content of the "root" elements should be returned. Most probably, if your root is more than one element, you should be returning null in here.
      Overrides:
      getLeaves in class BreadcrumbBarContentProvider<T>
      Parameters:
      path - Breadcrumb bar path.
      Returns:
      The leaf elements that correspond to the specified path
    • getLeafContent

      public InputStream getLeafContent(T leaf)
      Description copied from class: BreadcrumbBarContentProvider
      Returns the input stream with the leaf content. Some implementations may return null if this is not applicable.
      Overrides:
      getLeafContent in class BreadcrumbBarContentProvider<T>
      Parameters:
      leaf - Leaf.
      Returns:
      Input stream with the leaf content. May be null if this is not applicable.