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.
public abstract class BreadcrumbBarCallBack<T> extends java.lang.ObjectThe application callback that can be set onJBreadcrumbBar.
-
-
Constructor Summary
Constructors Constructor Description BreadcrumbBarCallBack()
-
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<StringValuePair<T>>getLeafs(java.util.List<BreadcrumbItem<T>> path)Returns the leaf elements that correspond to the specified path.java.util.List<StringValuePair<T>>getPathChoices(java.util.List<BreadcrumbItem<T>> path)Returns the choice elements that correspond to the specified path.voidsetThrowsExceptions(boolean throwsExceptions)Sets the indication whether the operations of this breadcrumb bar will throwBreadcrumbBarException.voidsetup()Sets up the callback.
-
-
-
Method Detail
-
setup
public void setup() throws BreadcrumbBarExceptionSets up the callback.- Throws:
BreadcrumbBarException- Runtime exception that wraps the cause. Is thrown only whensetThrowsExceptions(boolean)has been called withtrueparameter.
-
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 java.util.List<StringValuePair<T>> getPathChoices(java.util.List<BreadcrumbItem<T>> path) throws BreadcrumbBarException
Returns 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- Parameters:
path- Breadcrumb bar path.- Returns:
- The choice elements that correspond to the specified path
- Throws:
BreadcrumbBarException- Runtime exception that wraps the cause. Is thrown only whensetThrowsExceptions(boolean)has been called withtrueparameter.
-
getLeafs
public java.util.List<StringValuePair<T>> getLeafs(java.util.List<BreadcrumbItem<T>> path) throws BreadcrumbBarException
Returns 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.- Parameters:
path- Breadcrumb bar path.- Returns:
- The leaf elements that correspond to the specified path
- Throws:
BreadcrumbBarException- Runtime exception that wraps the cause. Is thrown only whensetThrowsExceptions(boolean)has been called withtrueparameter.
-
getLeafContent
public java.io.InputStream getLeafContent(T leaf) throws BreadcrumbBarException
Returns the input stream with the leaf content. Some implementations may returnnullif this is not applicable.- Parameters:
leaf- Leaf.- Returns:
- Input stream with the leaf content. May be
nullif this is not applicable. - Throws:
BreadcrumbBarException- Runtime exception that wraps the cause. Is thrown only whensetThrowsExceptions(boolean)has been called withtrueparameter.
-
-