{
TreeModel dataModel = comp.getTreeModel();
Object dataNode = path.getLastPathComponent();
Element handle = nodeInfo.getHandleElement();
HTMLImageElement handleImg;
if (handle instanceof HTMLAnchorElement)
handleImg = (HTMLImageElement)handle.getFirstChild();
else
handleImg = (HTMLImageElement)handle;
if (nodeInfo.isExpanded())
handleImg.setSrc("img/tree/tree_node_expanded.gif");
else
handleImg.setSrc("img/tree/tree_node_collapse.gif");
Element icon = nodeInfo.getIconElement();
HTMLImageElement iconImg;
if (icon instanceof HTMLAnchorElement)
iconImg = (HTMLImageElement)icon.getFirstChild();
else
iconImg = (HTMLImageElement)icon;
if (dataModel.isLeaf(dataNode))
{
setStyleProperty(handle,"display","none");
iconImg.setSrc("img/tree/gear.gif");
}
else
{
removeStyleProperty(handle,"display");
if (nodeInfo.isExpanded())
iconImg.setSrc("img/tree/tree_folder_open.gif");
else
iconImg.setSrc("img/tree/tree_folder_close.gif");
}
if (comp.isTreeTable())
{
Element contentParentElem = nodeInfo.getContentElement();