use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.IProjectTreeNode in project binnavi by google.
the class CProjectTree method showPopupMenu.
/**
* Shows a popup menu that depends on the node that was clicked.
*
* @param event The event to handle.
*/
private void showPopupMenu(final MouseEvent event) {
final IProjectTreeNode selectedNode = (IProjectTreeNode) TreeHelpers.getNodeAt(this, event.getX(), event.getY());
if (selectedNode == null) {
// Show the default menu
m_popup.show(this, event.getX(), event.getY());
} else {
setSelectionPath(new TreePath(((DefaultMutableTreeNode) selectedNode).getPath()));
final JPopupMenu menu = selectedNode.getPopupMenu();
if (menu != null) {
menu.show(this, event.getX(), event.getY());
}
}
}
use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.IProjectTreeNode in project binnavi by google.
the class CProjectTree method handleDoubleClick.
/**
* Passes double-click events to the nodes to handle them.
*
* @param event The event to handle.
*/
private void handleDoubleClick(final MouseEvent event) {
final IProjectTreeNode selectedNode = (IProjectTreeNode) TreeHelpers.getNodeAt(this, event.getX(), event.getY());
if (selectedNode == null) {
return;
}
selectedNode.doubleClicked();
}
Aggregations