Class BreadcrumbBarCallBack<T>
- java.lang.Object
-
- org.pushingpixels.flamingo.api.bcb.BreadcrumbBarCallBack<T>
-
- Type Parameters:
T
- Type of data associated with each breadcrumb bar item.
- Direct Known Subclasses:
BreadcrumbFileSelector.DirCallback
,BreadcrumbTreeAdapterSelector.TreeCallback
public abstract class BreadcrumbBarCallBack<T> extends Object
The application callback that can be set onJBreadcrumbBar
.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
throwsExceptions
Iftrue
, some of the operations will throwBreadcrumbBarException
.
-
Constructor Summary
Constructors Constructor Description BreadcrumbBarCallBack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getLeafContent(T leaf)
Returns the input stream with the leaf content.List<StringValuePair<T>>
getLeafs(List<BreadcrumbItem<T>> path)
Returns the choice element that corresponds to the specified path.List<StringValuePair<T>>
getPathChoices(List<BreadcrumbItem<T>> path)
Returns the choice element that corresponds to the specified path.void
setThrowsExceptions(boolean throwsExceptions)
Sets the indication whether the operations of this breadcrumb bar will throwBreadcrumbBarException
.void
setup()
Sets up the callback.
-
-
-
Field Detail
-
throwsExceptions
protected boolean throwsExceptions
Iftrue
, some of the operations will throwBreadcrumbBarException
.
-
-
Method Detail
-
setup
public void setup() throws BreadcrumbBarException
Sets up the callback.- Throws:
BreadcrumbBarException
- Runtime exception that wraps the cause. Is thrown only whensetThrowsExceptions(boolean)
has been called withtrue
parameter.
-
setThrowsExceptions
public void setThrowsExceptions(boolean throwsExceptions)
Sets the indication whether the operations of this breadcrumb bar will throwBreadcrumbBarException
.- Parameters:
throwsExceptions
- Iftrue
, the operations of this breadcrumb bar will throwBreadcrumbBarException
.
-
getPathChoices
public List<StringValuePair<T>> getPathChoices(List<BreadcrumbItem<T>> path) throws BreadcrumbBarException
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- Parameters:
path
- Breadcrumb bar path.- Returns:
- The choice element that corresponds to the specified path
- Throws:
BreadcrumbBarException
- Runtime exception that wraps the cause. Is thrown only whensetThrowsExceptions(boolean)
has been called withtrue
parameter.
-
getLeafs
public List<StringValuePair<T>> getLeafs(List<BreadcrumbItem<T>> path) throws BreadcrumbBarException
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- Parameters:
path
- Breadcrumb bar path.- Returns:
- The choice element that corresponds to the specified path
- Throws:
BreadcrumbBarException
- Runtime exception that wraps the cause. Is thrown only whensetThrowsExceptions(boolean)
has been called withtrue
parameter.
-
getLeafContent
public InputStream getLeafContent(T leaf) throws BreadcrumbBarException
Returns the input stream with the leaf content. Some implementations may returnnull
if this is not applicable.- Parameters:
leaf
- Leaf.- Returns:
- Input stream with the leaf content. May be
null
if this is not applicable. - Throws:
BreadcrumbBarException
- Runtime exception that wraps the cause. Is thrown only whensetThrowsExceptions(boolean)
has been called withtrue
parameter.
-
-