当前位置: 首页>>代码示例>>Java>>正文


Java ListPopup.showInCenterOf方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:VcsLogQuickSettingsActions.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:IntelliSortChooserPopupAction.java

示例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());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CreateComponentAction.java

示例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);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:IntelliSortChooserPopupAction.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:CodeStyleSchemeExporterUI.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:AddElementInCollectionAction.java

示例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);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:AddElementInCollectionAction.java

示例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);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:VcsLogGearActionGroup.java


注:本文中的com.intellij.openapi.ui.popup.ListPopup.showInCenterOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。