Class BreadcrumbTreeAdapterSelector.TreeCallback
- java.lang.Object
-
- org.pushingpixels.flamingo.api.bcb.BreadcrumbBarCallBack<Object>
-
- org.pushingpixels.flamingo.api.bcb.core.BreadcrumbTreeAdapterSelector.TreeCallback
-
- Enclosing class:
- BreadcrumbTreeAdapterSelector
public static class BreadcrumbTreeAdapterSelector.TreeCallback extends BreadcrumbBarCallBack<Object>
Tree-adapter specific implementation of theBreadcrumbBarCallBack
.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isRootVisible
Iftrue
, the first selector shows the tree root node.protected BreadcrumbTreeAdapterSelector.TreeAdapter
treeAdapter
The corresponding tree adapter.protected TreeModel
treeModel
The corresponding tree model.-
Fields inherited from class org.pushingpixels.flamingo.api.bcb.BreadcrumbBarCallBack
throwsExceptions
-
-
Constructor Summary
Constructors Constructor Description TreeCallback(TreeModel treeModel, BreadcrumbTreeAdapterSelector.TreeAdapter treeAdapter, boolean isRootVisible)
Creates the callback.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getLeafContent(Object leaf)
Returns the input stream with the leaf content.List<StringValuePair<Object>>
getLeafs(List<BreadcrumbItem<Object>> path)
Returns the choice element that corresponds to the specified path.List<StringValuePair<Object>>
getPathChoices(List<BreadcrumbItem<Object>> path)
Returns the choice element that corresponds to the specified path.-
Methods inherited from class org.pushingpixels.flamingo.api.bcb.BreadcrumbBarCallBack
setThrowsExceptions, setup
-
-
-
-
Field Detail
-
treeModel
protected TreeModel treeModel
The corresponding tree model.
-
treeAdapter
protected BreadcrumbTreeAdapterSelector.TreeAdapter treeAdapter
The corresponding tree adapter. Can not benull
.
-
isRootVisible
protected boolean isRootVisible
Iftrue
, the first selector shows the tree root node. Iffalse
, the first selector shows the tree root child nodes.
-
-
Constructor Detail
-
TreeCallback
public TreeCallback(TreeModel treeModel, BreadcrumbTreeAdapterSelector.TreeAdapter 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 List<StringValuePair<Object>> getPathChoices(List<BreadcrumbItem<Object>> path)
Description copied from class:BreadcrumbBarCallBack
Returns the choice element that corresponds to the specified path. If the path is empty,null
should be returned. If path isnull
, the "root" elements should be returned- Overrides:
getPathChoices
in classBreadcrumbBarCallBack<Object>
- Parameters:
path
- Breadcrumb bar path.- Returns:
- The choice element that corresponds to the specified path
-
getLeafs
public List<StringValuePair<Object>> getLeafs(List<BreadcrumbItem<Object>> path)
Description copied from class:BreadcrumbBarCallBack
Returns the choice element that corresponds to the specified path. If the path is empty,null
should be returned. If path isnull
, the "root" elements should be returned- Overrides:
getLeafs
in classBreadcrumbBarCallBack<Object>
- Parameters:
path
- Breadcrumb bar path.- Returns:
- The choice element that corresponds to the specified path
-
getLeafContent
public InputStream getLeafContent(Object leaf)
Description copied from class:BreadcrumbBarCallBack
Returns the input stream with the leaf content. Some implementations may returnnull
if this is not applicable.- Overrides:
getLeafContent
in classBreadcrumbBarCallBack<Object>
- Parameters:
leaf
- Leaf.- Returns:
- Input stream with the leaf content. May be
null
if this is not applicable.
-
-