public void handleEvent(TreePanelEvent<ModelData> be) {
be.getTreePanel().setExpanded(root, true);
}
});
TreePanelDragSource source = new TreePanelDragSource(tree);
source.addDNDListener(new DNDListener() {
@Override
public void dragStart(DNDEvent e) {
ModelData sel = tree.getSelectionModel().getSelectedItem();
if (sel != null && sel == tree.getStore().getRootItems().get(0)) {
e.setCancelled(true);