org.pushingpixels.flamingo.api.bcb.core
Class BreadcrumbFileSelector.DirCallback

java.lang.Object
  extended by org.pushingpixels.flamingo.api.bcb.BreadcrumbBarCallBack<File>
      extended by org.pushingpixels.flamingo.api.bcb.core.BreadcrumbFileSelector.DirCallback
Enclosing class:
BreadcrumbFileSelector

public static class BreadcrumbFileSelector.DirCallback
extends BreadcrumbBarCallBack<File>

Local file system specific implementation of the BreadcrumbBarCallBack.


Field Summary
protected  FileSystemView fsv
          File system view.
protected  boolean useNativeIcons
          If true, the path selectors will use native icons.
 
Fields inherited from class org.pushingpixels.flamingo.api.bcb.BreadcrumbBarCallBack
throwsExceptions
 
Constructor Summary
BreadcrumbFileSelector.DirCallback(boolean useNativeIcons)
          Creates a new callback.
BreadcrumbFileSelector.DirCallback(FileSystemView fileSystemView, boolean useNativeIcons)
          Creates a new callback.
 
Method Summary
 InputStream getLeafContent(File leaf)
          Returns the input stream with the leaf content.
 List<StringValuePair<File>> getLeafs(List<BreadcrumbItem<File>> path)
          Returns the choice element that corresponds to the specified path.
 List<StringValuePair<File>> getPathChoices(List<BreadcrumbItem<File>> path)
          Returns the choice element that corresponds to the specified path.
 void setup()
          Sets up the callback.
 
Methods inherited from class org.pushingpixels.flamingo.api.bcb.BreadcrumbBarCallBack
setThrowsExceptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fsv

protected FileSystemView fsv
File system view.


useNativeIcons

protected boolean useNativeIcons
If true, the path selectors will use native icons.

Constructor Detail

BreadcrumbFileSelector.DirCallback

public BreadcrumbFileSelector.DirCallback(boolean useNativeIcons)
Creates a new callback.

Parameters:
useNativeIcons - If true, the path selectors will use native icons.

BreadcrumbFileSelector.DirCallback

public BreadcrumbFileSelector.DirCallback(FileSystemView fileSystemView,
                                          boolean useNativeIcons)
Creates a new callback.

Parameters:
fileSystemView - File system view to use.
useNativeIcons - If true, the path selectors will use native icons.
Method Detail

setup

public void setup()
Description copied from class: BreadcrumbBarCallBack
Sets up the callback.

Overrides:
setup in class BreadcrumbBarCallBack<File>

getPathChoices

public List<StringValuePair<File>> getPathChoices(List<BreadcrumbItem<File>> 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<File>
Parameters:
path - Breadcrumb bar path.
Returns:
The choice element that corresponds to the specified path

getLeafs

public List<StringValuePair<File>> getLeafs(List<BreadcrumbItem<File>> 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<File>
Parameters:
path - Breadcrumb bar path.
Returns:
The choice element that corresponds to the specified path

getLeafContent

public InputStream getLeafContent(File 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<File>
Parameters:
leaf - Leaf.
Returns:
Input stream with the leaf content. May be null if this is not applicable.