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 theBreadcrumbBarContentProvider.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanisRootVisibleIftrue, the first selector shows the tree root node.private BreadcrumbTreeAdapterSelector.TreeAdapter<T>treeAdapterThe corresponding tree adapter.private javax.swing.tree.TreeModeltreeModelThe corresponding tree model.
-
Constructor Summary
Constructors Modifier Constructor Description privateTreeContentProvider(javax.swing.tree.TreeModel treeModel, BreadcrumbTreeAdapterSelector.TreeAdapter<T> treeAdapter, boolean isRootVisible)Creates the callback.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetLeafContent(T leaf)Returns the input stream with the leaf content.java.util.List<BreadcrumbItem<T>>getLeaves(java.util.List<BreadcrumbItem<T>> path)Returns the leaf elements that correspond to the specified path.java.util.List<BreadcrumbItem<T>>getPathChoices(java.util.List<BreadcrumbItem<T>> path)Returns the choice elements that correspond to the specified path.
-
-
-
Field Detail
-
treeModel
private javax.swing.tree.TreeModel treeModel
The corresponding tree model.
-
treeAdapter
private BreadcrumbTreeAdapterSelector.TreeAdapter<T> treeAdapter
The corresponding tree adapter. Can not benull.
-
isRootVisible
private boolean isRootVisible
Iftrue, the first selector shows the tree root node. Iffalse, the first selector shows the tree root child nodes.
-
-
Constructor Detail
-
TreeContentProvider
private TreeContentProvider(javax.swing.tree.TreeModel treeModel, BreadcrumbTreeAdapterSelector.TreeAdapter<T> treeAdapter, boolean isRootVisible)Creates the callback.- Parameters:
treeModel- The corresponding tree model.treeAdapter- The corresponding tree adapter. Can not benull.isRootVisible- Iftrue, the first selector shows the tree root node. Iffalse, the first selector shows the tree root child nodes.
-
-
Method Detail
-
getPathChoices
public java.util.List<BreadcrumbItem<T>> getPathChoices(java.util.List<BreadcrumbItem<T>> path)
Description copied from class:BreadcrumbBarContentProviderReturns the choice elements that correspond to the specified path. If the path is empty,nullshould be returned. If path isnull, the "root" elements should be returned- Overrides:
getPathChoicesin classBreadcrumbBarContentProvider<T>- Parameters:
path- Breadcrumb bar path.- Returns:
- The choice elements that correspond to the specified path
-
getLeaves
public java.util.List<BreadcrumbItem<T>> getLeaves(java.util.List<BreadcrumbItem<T>> path)
Description copied from class:BreadcrumbBarContentProviderReturns the leaf elements that correspond to the specified path. If the path is empty,nullshould be returned. If path isnull, 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:
getLeavesin classBreadcrumbBarContentProvider<T>- Parameters:
path- Breadcrumb bar path.- Returns:
- The leaf elements that correspond to the specified path
-
getLeafContent
public java.io.InputStream getLeafContent(T leaf)
Description copied from class:BreadcrumbBarContentProviderReturns the input stream with the leaf content. Some implementations may returnnullif this is not applicable.- Overrides:
getLeafContentin classBreadcrumbBarContentProvider<T>- Parameters:
leaf- Leaf.- Returns:
- Input stream with the leaf content. May be
nullif this is not applicable.
-
-