T
- Type of data associated with each breadcrumb bar item.BreadcrumbFileSelector.DirCallback
, BreadcrumbTreeAdapterSelector.TreeCallback
public abstract class BreadcrumbBarCallBack<T>
extends java.lang.Object
JBreadcrumbBar
.Modifier and Type | Field | Description |
---|---|---|
protected boolean |
throwsExceptions |
If
true , some of the operations will throw
BreadcrumbBarException . |
Constructor | Description |
---|---|
BreadcrumbBarCallBack() |
Modifier and Type | Method | Description |
---|---|---|
java.io.InputStream |
getLeafContent(T leaf) |
Returns the input stream with the leaf content.
|
java.util.List<StringValuePair<T>> |
getLeafs(java.util.List<BreadcrumbItem<T>> path) |
Returns the choice element that corresponds to the specified path.
|
java.util.List<StringValuePair<T>> |
getPathChoices(java.util.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
throw
BreadcrumbBarException . |
void |
setup() |
Sets up the callback.
|
protected boolean throwsExceptions
true
, some of the operations will throw
BreadcrumbBarException
.public void setup() throws BreadcrumbBarException
BreadcrumbBarException
- Runtime exception that wraps the cause. Is thrown only when
setThrowsExceptions(boolean)
has been called with
true
parameter.public void setThrowsExceptions(boolean throwsExceptions)
BreadcrumbBarException
.throwsExceptions
- If true
, the operations of this breadcrumb bar
will throw BreadcrumbBarException
.public java.util.List<StringValuePair<T>> getPathChoices(java.util.List<BreadcrumbItem<T>> path) throws BreadcrumbBarException
null
should be returned. If path is
null
, the "root" elements should be returnedpath
- Breadcrumb bar path.BreadcrumbBarException
- Runtime exception that wraps the cause. Is thrown only when
setThrowsExceptions(boolean)
has been called with
true
parameter.public java.util.List<StringValuePair<T>> getLeafs(java.util.List<BreadcrumbItem<T>> path) throws BreadcrumbBarException
null
should be returned. If path is
null
, the "root" elements should be returnedpath
- Breadcrumb bar path.BreadcrumbBarException
- Runtime exception that wraps the cause. Is thrown only when
setThrowsExceptions(boolean)
has been called with
true
parameter.public java.io.InputStream getLeafContent(T leaf) throws BreadcrumbBarException
null
if this is not applicable.leaf
- Leaf.null
if
this is not applicable.BreadcrumbBarException
- Runtime exception that wraps the cause. Is thrown only when
setThrowsExceptions(boolean)
has been called with
true
parameter.