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


Java IdeFocusManager.findInstance方法代码示例

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


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

示例1: setDisplayed

import com.intellij.openapi.wm.IdeFocusManager; //导入方法依赖的package包/类
/**
 * Displays the presentation to the user.
 */
public void setDisplayed(boolean visible){
  createHelpWindow();
  if(myModallyActivated){
    myDialog.setVisible(visible);
    if(visible){
      myDialog.setLocationRelativeTo(myDialog.getOwner());
    }
  } else{
    //myFrame.setLocationRelativeTo(null);
    myFrame.setVisible(visible);
    myFrame.setState(JFrame.NORMAL);
    IdeFocusManager focusManager = IdeFocusManager.findInstance();
    JComponent target = focusManager.getFocusTargetFor(myFrame.getRootPane());
    focusManager.requestFocus(target != null ? target : myFrame, true);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:IdeaHelpBroker.java

示例2: getFocusManager

import com.intellij.openapi.wm.IdeFocusManager; //导入方法依赖的package包/类
@Override
public IdeFocusManager getFocusManager() {
  Project project = getProject();
  if (project != null && !project.isDisposed()) {
    return IdeFocusManager.getInstance(project);
  }
  else {
    return IdeFocusManager.findInstance();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:DialogWrapperPeerImpl.java

示例3: open

import com.intellij.openapi.wm.IdeFocusManager; //导入方法依赖的package包/类
/**
 * Opens the given project in the IDE.
 *
 * @param project the project to open.
 */
public static void open(@NotNull Project project) {
  updateLastProjectLocation(project.getBasePath());
  if (WindowManager.getInstance().isFullScreenSupportedInCurrentOS()) {
    IdeFocusManager instance = IdeFocusManager.findInstance();
    IdeFrame lastFocusedFrame = instance.getLastFocusedFrame();
    if (lastFocusedFrame instanceof IdeFrameEx) {
      boolean fullScreen = ((IdeFrameEx)lastFocusedFrame).isInFullScreen();
      if (fullScreen) {
        project.putUserData(SHOULD_OPEN_IN_FULL_SCREEN, TRUE);
      }
    }
  }
  ProjectManagerEx.getInstanceEx().openProject(project);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:Projects.java


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