This example shows how to use the Ext.tree.Panel class with a GeoExt.data.store.LayersTree and shows two methods how to include legends for every treenode.

Have a look at tree-legend-simple.js to see how this is done.