List of usage examples for com.intellij.openapi.ui.popup ListPopup showInScreenCoordinates
void showInScreenCoordinates(@NotNull Component owner, @NotNull Point point);
From source file:com.github.cssxfire.ui.CssToolWindow.java
License:Apache License
private void showMenu(@Nullable TreePath path, @NotNull Point point) { if (path != null) { myTree.setSelectionPath(path);/*from www .java2s .c o m*/ Object source = path.getLastPathComponent(); ActionGroup actionGroup = source instanceof CssTreeNode ? ((CssTreeNode) source).getActionGroup() : null; if (actionGroup != null) { ListPopup listPopup = JBPopupFactory.getInstance().createActionGroupPopup(null, actionGroup, createDataContext(), JBPopupFactory.ActionSelectionAid.MNEMONICS, true, IncomingChangesComponent.TOOLWINDOW_ID); listPopup.showInScreenCoordinates(myTree, point); } } }
From source file:com.googlecode.cssxfire.ui.CssToolWindow.java
License:Apache License
private void showMenu(@Nullable TreePath path, @NotNull Point point) { if (path != null) { tree.setSelectionPath(path);//from w w w .ja va2 s. c o m Object source = path.getLastPathComponent(); ActionGroup actionGroup = source instanceof CssTreeNode ? ((CssTreeNode) source).getActionGroup() : null; if (actionGroup != null) { ListPopup listPopup = JBPopupFactory.getInstance().createActionGroupPopup(null, actionGroup, createDataContext(), JBPopupFactory.ActionSelectionAid.MNEMONICS, true); listPopup.showInScreenCoordinates(tree, point); } } }