本文整理汇总了Java中com.intellij.openapi.ui.popup.ListPopup.showInCenterOf方法的典型用法代码示例。如果您正苦于以下问题:Java ListPopup.showInCenterOf方法的具体用法?Java ListPopup.showInCenterOf怎么用?Java ListPopup.showInCenterOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.ui.popup.ListPopup
的用法示例。
在下文中一共展示了ListPopup.showInCenterOf方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
Project project = e.getRequiredData(CommonDataKeys.PROJECT);
VcsLogUi logUi = e.getRequiredData(VcsLogDataKeys.VCS_LOG_UI);
VcsLogSettings settings = ServiceManager.getService(project, VcsLogSettings.class);
ListPopup popup = JBPopupFactory.getInstance()
.createActionGroupPopup(null, new MySettingsActionGroup(settings, logUi), e.getDataContext(),
JBPopupFactory.ActionSelectionAid.MNEMONICS, true, ToolWindowContentUi.POPUP_PLACE);
Component component = e.getInputEvent().getComponent();
if (component instanceof ActionButtonComponent) {
popup.showUnderneathOf(component);
}
else {
popup.showInCenterOf(component);
}
}
示例2: actionPerformed
import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
final VcsLogUi logUI = e.getRequiredData(VcsLogDataKeys.VCS_LOG_UI);
ActionGroup settingsGroup =
new DefaultActionGroup(ContainerUtil.map(PermanentGraph.SortType.values(), new Function<PermanentGraph.SortType, AnAction>() {
@Override
public AnAction fun(PermanentGraph.SortType sortType) {
return new SelectIntelliSortTypeAction(logUI, sortType);
}
}));
ListPopup popup = JBPopupFactory.getInstance()
.createActionGroupPopup(null, settingsGroup, e.getDataContext(), JBPopupFactory.ActionSelectionAid.MNEMONICS, true,
ToolWindowContentUi.POPUP_PLACE);
Component component = e.getInputEvent().getComponent();
if (component instanceof ActionButtonComponent) {
popup.showUnderneathOf(component);
}
else {
popup.showInCenterOf(component);
}
}
示例3: actionPerformed
import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
protected void actionPerformed(final GuiEditor editor, final List<RadComponent> selection, final AnActionEvent e) {
Processor<ComponentItem> processor = new Processor<ComponentItem>() {
public boolean process(final ComponentItem selectedValue) {
if (selectedValue != null) {
myLastCreatedComponent = selectedValue;
editor.getMainProcessor().startInsertProcessor(selectedValue, getCreateLocation(editor, selection));
}
return true;
}
};
PaletteListPopupStep step = new PaletteListPopupStep(editor, myLastCreatedComponent, processor,
UIDesignerBundle.message("create.component.title"));
final ListPopup listPopup = JBPopupFactory.getInstance().createListPopup(step);
if (selection.size() > 0) {
FormEditingUtil.showPopupUnderComponent(listPopup, selection.get(0));
}
else {
listPopup.showInCenterOf(editor.getRootContainer().getDelegee());
}
}
示例4: actionPerformed
import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
VcsLogUi logUI = e.getRequiredData(VcsLogDataKeys.VCS_LOG_UI);
VcsLogUiProperties properties = e.getRequiredData(VcsLogInternalDataKeys.LOG_UI_PROPERTIES);
ActionGroup settingsGroup = new DefaultActionGroup(
ContainerUtil.map(PermanentGraph.SortType.values(), (Function<PermanentGraph.SortType, AnAction>)sortType -> new SelectIntelliSortTypeAction(logUI, properties, sortType)));
ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(null, settingsGroup, e.getDataContext(), JBPopupFactory.ActionSelectionAid.MNEMONICS, true, ToolWindowContentUI.POPUP_PLACE);
Component component = e.getInputEvent().getComponent();
if (component instanceof ActionButtonComponent) {
popup.showUnderneathOf(component);
}
else {
popup.showInCenterOf(component);
}
}
示例5: export
import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
void export() {
ListPopup popup = JBPopupFactory.getInstance().createListPopup(
new BaseListPopupStep<String>(ApplicationBundle.message("scheme.exporter.ui.export.as.title"), enumExporters()) {
@Override
public PopupStep onChosen(final String selectedValue, boolean finalChoice) {
return doFinalStep(new Runnable() {
@Override
public void run() {
exportSchemeUsing(selectedValue);
}
});
}
});
popup.showInCenterOf(myParentComponent);
}
示例6: showPopup
import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
@Override
protected void showPopup(final ListPopup groupPopup, final AnActionEvent e) {
if (myTreeView == null) {
if (e.getPlace().equals(DomModelTreeView.DOM_MODEL_TREE_VIEW_POPUP)) {
groupPopup.showInCenterOf(getTreeView(e).getTree());
}
else {
groupPopup.showInBestPositionFor(e.getDataContext());
}
}
else {
super.showPopup(groupPopup, e);
}
}
示例7: showPopup
import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
protected void showPopup(final ListPopup groupPopup, final AnActionEvent e) {
if (myTreeView == null) {
if (e.getPlace().equals(DomModelTreeView.DOM_MODEL_TREE_VIEW_POPUP)) {
groupPopup.showInCenterOf(getTreeView(e).getTree());
}
else {
groupPopup.showInBestPositionFor(e.getDataContext());
}
}
else {
super.showPopup(groupPopup, e);
}
}
示例8: actionPerformed
import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
@Override
public void actionPerformed(@Nonnull AnActionEvent e) {
DefaultActionGroup group = new DefaultActionGroup(ActionManager.getInstance().getAction(myActionGroup));
ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(null, group, e.getDataContext(), JBPopupFactory.ActionSelectionAid.MNEMONICS, true, ToolWindowContentUI.POPUP_PLACE);
Component component = e.getInputEvent().getComponent();
if (component instanceof ActionButtonComponent) {
popup.showUnderneathOf(component);
}
else {
popup.showInCenterOf(component);
}
}