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


Java ListPopup.showUnderneathOf方法代码示例

本文整理汇总了Java中com.intellij.openapi.ui.popup.ListPopup.showUnderneathOf方法的典型用法代码示例。如果您正苦于以下问题:Java ListPopup.showUnderneathOf方法的具体用法?Java ListPopup.showUnderneathOf怎么用?Java ListPopup.showUnderneathOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.ui.popup.ListPopup的用法示例。


在下文中一共展示了ListPopup.showUnderneathOf方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: chooseTypeAndCreate

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
public static void chooseTypeAndCreate(final ClasspathPanel classpathPanel,
                                       final StructureConfigurableContext context,
                                       final JButton contextButton, @NotNull final LibraryCreatedCallback callback) {
  if (LibraryEditingUtil.hasSuitableTypes(classpathPanel)) {
    final ListPopup popup = JBPopupFactory.getInstance().createListPopup(LibraryEditingUtil.createChooseTypeStep(classpathPanel, new ParameterizedRunnable<LibraryType>() {
      @Override
      public void run(LibraryType libraryType) {
        doCreateLibrary(classpathPanel, context, callback, contextButton, libraryType);
      }
    }));
    popup.showUnderneathOf(contextButton);
  }
  else {
    doCreateLibrary(classpathPanel, context, callback, contextButton, null);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:AddNewLibraryDependencyAction.java

示例2: 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

示例3: 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

示例4: showPopup

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
protected void showPopup(DataContext context, ListPopup popup, JComponent contextComponent) {
  Component focusedComponent = contextComponent != null ? contextComponent : PlatformDataKeys.CONTEXT_COMPONENT.getData(context);
  if (focusedComponent != null) {
    if (popup instanceof PopupFactoryImpl.ActionGroupPopup && focusedComponent instanceof JLabel) {
      ((PopupFactoryImpl.ActionGroupPopup)popup).showUnderneathOfLabel((JLabel)focusedComponent);
    } else {
      popup.showUnderneathOf(focusedComponent);
    }
  }
  else {
    Rectangle r;
    int x;
    int y;
    focusedComponent = WindowManagerEx.getInstanceEx().getFocusedComponent((Project)null);
    r = WindowManagerEx.getInstanceEx().getScreenBounds();
    x = r.x + r.width / 2;
    y = r.y + r.height / 2;
    Point point = new Point(x, y);
    SwingUtilities.convertPointToScreen(point, focusedComponent.getParent());

    popup.showInScreenCoordinates(focusedComponent.getParent(), point);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:WelcomePopupAction.java

示例5: showIntentionPopup

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
final void showIntentionPopup(){
  LOG.debug("showIntentionPopup()");
  if(myHint == null || !myHint.isVisible()){
    return;
  }
  final ErrorInfo[] errorInfos = getErrorInfos();
  if(!haveFixes(errorInfos)){
    return;
  }

  final ArrayList<ErrorWithFix> fixList = new ArrayList<ErrorWithFix>();
  for(ErrorInfo errorInfo: errorInfos) {
    final QuickFix[] quickFixes = errorInfo.myFixes;
    if (quickFixes.length > 0) {
      for (QuickFix fix: quickFixes) {
        fixList.add(new ErrorWithFix(errorInfo, fix));
      }
    }
    else if (errorInfo.getInspectionId() != null) {
      buildSuppressFixes(errorInfo, fixList, true);
    }
  }

  final ListPopup popup = JBPopupFactory.getInstance().createListPopup(new QuickFixPopupStep(fixList, true));
  popup.showUnderneathOf(myHint.getComponent());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:QuickFixManager.java

示例6: showPopup

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
protected void showPopup(DataContext context, ListPopup popup, JComponent contextComponent) {
  Component focusedComponent = contextComponent != null ? contextComponent : PlatformDataKeys.CONTEXT_COMPONENT.getData(context);
  if (focusedComponent != null) {
    popup.showUnderneathOf(focusedComponent);
  }
  else {
    Rectangle r;
    int x;
    int y;
    focusedComponent = WindowManagerEx.getInstanceEx().getFocusedComponent((Project)null);
    r = WindowManagerEx.getInstanceEx().getScreenBounds();
    x = r.x + r.width / 2;
    y = r.y + r.height / 2;
    Point point = new Point(x, y);
    SwingUtilities.convertPointToScreen(point, focusedComponent.getParent());

    popup.showInScreenCoordinates(focusedComponent.getParent(), point);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:WelcomePopupAction.java

示例7: 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

示例8: showPopup

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
protected void showPopup(DataContext context, ListPopup popup, JComponent contextComponent) {
  Component focusedComponent = contextComponent != null ? contextComponent : context.getData(PlatformDataKeys.CONTEXT_COMPONENT);
  if (focusedComponent != null) {
    if (popup instanceof PopupFactoryImpl.ActionGroupPopup && focusedComponent instanceof JLabel) {
      ((PopupFactoryImpl.ActionGroupPopup)popup).showUnderneathOfLabel((JLabel)focusedComponent);
    } else {
      popup.showUnderneathOf(focusedComponent);
    }
  }
  else {
    Rectangle r;
    int x;
    int y;
    focusedComponent = WindowManagerEx.getInstanceEx().getFocusedComponent((Project)null);
    r = WindowManagerEx.getInstanceEx().getScreenBounds();
    x = r.x + r.width / 2;
    y = r.y + r.height / 2;
    Point point = new Point(x, y);
    SwingUtilities.convertPointToScreen(point, focusedComponent.getParent());

    popup.showInScreenCoordinates(focusedComponent.getParent(), point);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:WelcomePopupAction.java

示例9: actionPerformed

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent e) {
  final JBPopupFactory popupFactory = JBPopupFactory.getInstance();
  final ListPopupStep step = popupFactory.createActionsStep(myActionGroup, e.getDataContext(), false, false,
                                                            myActionGroup.getTemplatePresentation().getText(), myTree, true,
                                                            myPreselection != null ? myPreselection.getDefaultIndex() : 0, true);
  final ListPopup listPopup = popupFactory.createListPopup(step);
  listPopup.setHandleAutoSelectionBeforeShow(true);
  if (e instanceof AnActionButton.AnActionEventWrapper) {
    ((AnActionButton.AnActionEventWrapper)e).showPopup(listPopup);
  } else {
    listPopup.showUnderneathOf(myNorthPanel);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:MasterDetailsComponent.java

示例10: showContentPopup

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
@Override
public void showContentPopup(ListPopup listPopup) {
  Content selected = myUi.myManager.getSelectedContent();
  if (selected != null) {
    ContentTabLabel tab = myContent2Tabs.get(selected);
    listPopup.showUnderneathOf(tab);
  } else {
    listPopup.showUnderneathOf(myIdLabel);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:TabContentLayout.java

示例11: showAddPopup

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
private void showAddPopup(final boolean showApplicableTypesOnly) {
  ConfigurationType[] allTypes = getRunManager().getConfigurationFactories(false);
  final List<ConfigurationType> configurationTypes = getTypesToShow(showApplicableTypesOnly, allTypes);
  Collections.sort(configurationTypes, new Comparator<ConfigurationType>() {
    @Override
    public int compare(final ConfigurationType type1, final ConfigurationType type2) {
      return type1.getDisplayName().compareToIgnoreCase(type2.getDisplayName());
    }
  });
  final int hiddenCount = allTypes.length - configurationTypes.size();
  if (hiddenCount > 0) {
    configurationTypes.add(null);
  }

  final ListPopup popup = NewRunConfigurationPopup.createAddPopup(configurationTypes, hiddenCount + " items more (irrelevant)...",
                                                                  new Consumer<ConfigurationFactory>() {
                                           @Override
                                           public void consume(ConfigurationFactory factory) {
                                             createNewConfiguration(factory);
                                           }
                                         }, getSelectedConfigurationType(), new Runnable() {
      @Override
      public void run() {
        showAddPopup(false);
      }
    }, true);
  //new TreeSpeedSearch(myTree);
  popup.showUnderneathOf(myToolbarDecorator.getActionsPanel());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:RunConfigurable.java

示例12: showPopup

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
protected void showPopup(final ListPopup groupPopup, final AnActionEvent e) {
  final Component component = e.getInputEvent().getComponent();

  if (component instanceof ActionButtonComponent) {
    groupPopup.showUnderneathOf(component);
  } else {
    groupPopup.showInBestPositionFor(e.getDataContext());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AddDomElementAction.java

示例13: actionPerformed

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
  if (!CloudConfigurationProvider.isEnabled()) {
    promptToLaunchEmulator();
    return;
  }

  ListPopup popup = JBPopupFactory.getInstance()
    .createListPopup(new BaseListPopupStep<String>("Launch a Device", new String[]{EMULATOR, CLOUD_DEVICE}) {
      @Override
      public PopupStep onChosen(String selectedValue, boolean finalChoice) {
        if (selectedValue.equals(EMULATOR)) {
          doFinalStep(new Runnable() {
            @Override
            public void run() {
              promptToLaunchEmulator();
            }
          });
        }
        else if (selectedValue.equals(CLOUD_DEVICE)) {
          doFinalStep(new Runnable() {
            @Override
            public void run() {
              promptToLaunchCloudDevice();
            }
          });
        }
        return FINAL_CHOICE;
      }
    });

  popup.showUnderneathOf(myLaunchEmulatorButton);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:ExtendedDeviceChooserDialog.java

示例14: showPopup

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
private void showPopup() {
  if (myHint == null || !myHint.isVisible()) {
    return;
  }

  List<ErrorInfo> errorInfos = getErrorInfos();
  if (!ErrorInfo.haveFixes(errorInfos)) {
    return;
  }

  ListPopup popup = JBPopupFactory.getInstance().createListPopup(new FirstStep(errorInfos));
  popup.showUnderneathOf(myHint.getComponent());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:AbstractQuickFixManager.java

示例15: showDropDownMenu

import com.intellij.openapi.ui.popup.ListPopup; //导入方法依赖的package包/类
/**
 * Displays the dropdown menu with the latest items
 */
private void showDropDownMenu() {
    if (isEnabled) {
        final ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(null, group, DataManager.getInstance().getDataContext(this), JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, true);
        popup.showUnderneathOf(this);
    }
}
 
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:10,代码来源:FilterDropDown.java


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