if ( elemName == null ) {
elemName = anElement.getName();
}
}
BrowserTreeNode theNode = new BrowserTreeNode();
theNode.setText( elemName );
theNode.setIconAccessor("folderc");
theNode.setAction("showElementPanel");
theNode.setUserObject(anElement);
theNode.setName("element");
// set the menu if found
JPopupMenu theNodeMenu = getCommandManager().createPopupMenu( menuName );
// if no menu found, use the default one.
if ( theNodeMenu == null ) {
theNode.setMenu( getCommandManager().createPopupMenu( "nodeMenu" ));
}
else {
theNode.setMenu( theNodeMenu );
}
theNode.setEnabled(true);
return theNode;
}