TreePath treePath = tree.getPathForLocation(e.getX(), e.getY());
Object object = treePath.getLastPathComponent();
if (object instanceof NamedObj) {
NamedObj namedObj = (NamedObj) object;
JContextMenu menu = new JContextMenu(namedObj, namedObj
.getFullName());
Iterator i = menuItemFactoryList().iterator();
while (i.hasNext()) {
MenuItemFactory factory = (MenuItemFactory) i.next();
factory.create(menu, namedObj);
}
menu.show(tree, e.getX(), e.getY());
e.consume();
}
}