A TreeModel implementation that reads the underlying file system to generate the tree nodes.
This implementation is dead-simple — no automatic refresh when the file system changes, no model events, no nothing.
This library should be useful in editors, preferences panels, etc. Basically, anywhere a simple filesystem needs to be shown. Since it doesn't have many options, the API is dead easy to understand.
The model was instantiated with the root being the project's source folder.
You also have to realize that this is a TreeModel,
not a JTree
reimplementation. So, the icons and
everything else is the base JTree
. Use
JGoodies Looks
for a different look'n'feel for your applications.
A simple instantiation of FileSystemTreeModel with the tree's root as a File instance is all you need:
JTree tree = new JTree(); File fileSystemRoot = new File(".").getCanonicalFile(); tree.setModel(new FileSystemTreeModel(root));
The API documentation is available here.
This library was built with Java 2 1.3 in mind. No 1.4 or 1.5 features are used. The library is compiled on the 1.4 platform, but should directly run using any 1.3 or better platform.
Javac's target option is used to generate 1.3 class files. See the Ant build file for details.
Please contact fbos@users.sourceforge.net (François Beausoleil) for any requests, bugs or other information.
Oh yeah, I almost forgot… This library is distributed under no license, meaning it's in the public domain. You may do as you wish with it — sell it, destroy it, use it, not use it, etc.
If you do use it, I would appreciate a quick E-Mail to tell me so, but beyond that, nothing is required.
Enjoy !
You must use Subversion to access this project's source code. See the Subversion Book for reference information and general usage information.
To checkout, once you have installed Subversion:
$ svn checkout http://opensvn.csie.org/fstreem/trunk
To get a list of releases, visit http://opensvn.csie.org/fstreem/tags/.