use of com.google.security.zynamics.binnavi.Gui.GraphWindows.NodeTaggingTree.Nodes.ITagTreeNode in project binnavi by google.
the class CTagsTree method showPopupMenu.
/**
* Shows the context menu for a given mouse event.
*
* @param event The mouse event that triggered the popup menu.
*/
private void showPopupMenu(final MouseEvent event) {
final ITagTreeNode selectedNode = (ITagTreeNode) TreeHelpers.getNodeAt(this, event.getX(), event.getY());
if (selectedNode == null) {
// Show the default menu
final JPopupMenu popupMenu = new JPopupMenu();
popupMenu.add(CActionProxy.proxy(new CAddRootTagNodeAction(m_parent, m_tagManager, m_rootNode.getTag())));
popupMenu.show(this, event.getX(), event.getY());
} else {
final JPopupMenu menu = selectedNode.getPopupMenu();
if (menu != null) {
menu.show(this, event.getX(), event.getY());
}
}
}
Aggregations