org.jvnet.flamingo.bcb.core
Class BreadcrumbTreeAdapterSelector.TreeCallback

java.lang.Object
  extended by org.jvnet.flamingo.bcb.BreadcrumbBarCallBack<java.lang.Object>
      extended by org.jvnet.flamingo.bcb.core.BreadcrumbTreeAdapterSelector.TreeCallback
Enclosing class:
BreadcrumbTreeAdapterSelector

public static class BreadcrumbTreeAdapterSelector.TreeCallback
extends BreadcrumbBarCallBack<java.lang.Object>

Tree-adapter specific implementation of the BreadcrumbBarCallBack .

Author:
Kirill Grouchnikov

Constructor Summary
BreadcrumbTreeAdapterSelector.TreeCallback(javax.swing.tree.TreeModel treeModel, BreadcrumbTreeAdapterSelector.TreeAdapter treeAdapter, boolean isRootVisible)
          Creates the callback.
 
Method Summary
 java.io.InputStream getLeafContent(java.lang.Object leaf)
          Returns the input stream with the leaf content.
 java.util.List<StringValuePair<java.lang.Object>> getLeafs(java.util.List<BreadcrumbItem<java.lang.Object>> path)
          Returns the choice element that corresponds to the specified path.
 java.util.List<StringValuePair<java.lang.Object>> getPathChoices(java.util.List<BreadcrumbItem<java.lang.Object>> path)
          Returns the choice element that corresponds to the specified path.
 
Methods inherited from class org.jvnet.flamingo.bcb.BreadcrumbBarCallBack
setThrowsExceptions, setup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreadcrumbTreeAdapterSelector.TreeCallback

public BreadcrumbTreeAdapterSelector.TreeCallback(javax.swing.tree.TreeModel treeModel,
                                                  BreadcrumbTreeAdapterSelector.TreeAdapter treeAdapter,
                                                  boolean isRootVisible)
Creates the callback.

Parameters:
treeModel - The corresponding tree model.
treeAdapter - The corresponding tree adapter. Can not be null.
isRootVisible - If true, the first selector shows the tree root node. If false, the first selector shows the tree root child nodes.
Method Detail

getPathChoices

public java.util.List<StringValuePair<java.lang.Object>> getPathChoices(java.util.List<BreadcrumbItem<java.lang.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 is null, the "root" elements should be returned

Overrides:
getPathChoices in class BreadcrumbBarCallBack<java.lang.Object>
Parameters:
path - Breadcrumb bar path.
Returns:
The choice element that corresponds to the specified path

getLeafs

public java.util.List<StringValuePair<java.lang.Object>> getLeafs(java.util.List<BreadcrumbItem<java.lang.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 is null, the "root" elements should be returned

Overrides:
getLeafs in class BreadcrumbBarCallBack<java.lang.Object>
Parameters:
path - Breadcrumb bar path.
Returns:
The choice element that corresponds to the specified path

getLeafContent

public java.io.InputStream getLeafContent(java.lang.Object leaf)
Description copied from class: BreadcrumbBarCallBack
Returns the input stream with the leaf content. Some implementations may return null if this is not applicable.

Overrides:
getLeafContent in class BreadcrumbBarCallBack<java.lang.Object>
Parameters:
leaf - Leaf.
Returns:
Input stream with the leaf content. May be null if this is not applicable.