ApplicationUtil.waitCursorOn();
int row = tree.getRowForPath(path);
tree.setSelectionRow(row);
InteractionEvent iae = null;
try
{
// Broadcast an interaction event to collect the popup menu entries to display
iae = new InteractionEvent(this, InteractionEvent.POPUP, new BasicTransferable(((LeafNode) node).getLeafData()));
fireEvent(iae);
}
finally
{
// Reset the wait cursor
ApplicationUtil.waitCursorOff();
}
// Create and display the menu
JaspiraPopupMenu menu = iae.createPopupMenu();
// When showing the menu directly from here, the portion of the menu that overlaps the current
// tree row gets painted, but the remainder of the menu will be painted after the tree view
// was refreshed. In order to prevent this, we dealy the menu display until the update events
// have been processed.