Class SingleRootFileSystemView

java.lang.Object
javax.swing.filechooser.FileSystemView
org.jjazz.uiutilities.api.SingleRootFileSystemView

public class SingleRootFileSystemView extends FileSystemView
A FileSystemView class that limits the file selections to a single root.

When used with the JFileChooser component the user will only be able to traverse the directories contained within the specified root fill.

The "Look In" combo box will only display the specified root.

The "Up One Level" button will be disable when at the root.

Thanks to Rob Camick. This class is designed to be used once, for one ROOT directory. To limit the file chooser to search the files in my Java JDK I used:
File root = new File("c:/java/jdk6.7");
FileSystemView fsv = new SingleRootFileSystemView( root );
JFileChooser chooser = new JFileChooser(fsv);