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


Java JBPopup.cancel方法代码示例

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


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

示例1: cancelPopups

import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
private static boolean cancelPopups(final JBPopup[] activePopup) {
  for (JBPopup popup : activePopup) {
    if (popup != null && popup.isVisible()) {
      popup.cancel();
      return true;
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SearchUtil.java

示例2: closeDocHint

import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
private void closeDocHint() {
  JBPopup hint = getDocInfoHint();
  if (hint == null) {
    return;
  }
  myCloseOnSneeze = false;
  hint.cancel();
  Component toFocus = myPreviouslyFocused;
  hint.cancel();
  if (toFocus != null) {
    IdeFocusManager.getInstance(myProject).requestFocus(toFocus, true);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:DocumentationManager.java

示例3: actionPerformed

import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
  super.actionPerformed(e);
  final JBPopup hint = myHint;
  if (hint != null && hint.isVisible()) {
    hint.cancel();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:DocumentationComponent.java

示例4: closeQuickDocIfPossible

import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
private void closeQuickDocIfPossible() {
  myAlarm.cancelAllRequests();
  DocumentationManager docManager = getDocManager();
  if (docManager == null) {
    return;
  }

  JBPopup hint = docManager.getDocInfoHint();
  if (hint == null) {
    return;
  }
  
  hint.cancel();
  myDocumentationManager = null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:QuickDocOnMouseOverManager.java

示例5: handleMnemonic

import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
@Override
public void handleMnemonic(KeyEvent e, Project project, JBPopup popup) {
  char mnemonic = e.getKeyChar();
  final Bookmark bookmark = BookmarkManager.getInstance(project).findBookmarkForMnemonic(mnemonic);
  if (bookmark != null) {
    popup.cancel();
    IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(new Runnable() {
      @Override
      public void run() {
        bookmark.navigate(true);
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:BookmarksAction.java

示例6: itemChosen

import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
@Override
public void itemChosen(ItemWrapper item, Project project, JBPopup popup, boolean withEnterOrDoubleClick) {
  if (item instanceof BookmarkItem && withEnterOrDoubleClick) {
    Bookmark bookmark = ((BookmarkItem)item).getBookmark();
    popup.cancel();
    bookmark.navigate(true);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:BookmarksAction.java

示例7: showOpenTaskDialog

import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
private static void showOpenTaskDialog(final Project project, final Task task) {
  JBPopup hint = DocumentationManager.getInstance(project).getDocInfoHint();
  if (hint != null) hint.cancel();
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    @Override
    public void run() {
      new OpenTaskDialog(project, task).show();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:GotoTaskAction.java


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