We've packaged the tree control used in the SilverStripe CMS into component that you can re-use in your own applications.
Like the rest of our open-source software, the SilverStripe Tree Control is released under the BSD License, which means that you can put it into both open-source and commercial projects.