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


Java IdeFrame.getStatusBar方法代码示例

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


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

示例1: BackgroundableProcessIndicator

import com.intellij.openapi.wm.IdeFrame; //导入方法依赖的package包/类
public BackgroundableProcessIndicator(@Nullable final Project project, @NotNull TaskInfo info, @NotNull PerformInBackgroundOption option) {
  super(info.isCancellable(), true, project, info.getCancelText());
  if (project != null) {
    final ProjectManagerAdapter myListener = new ProjectManagerAdapter() {
      @Override
      public void projectClosing(Project closingProject) {
        if (isRunning()) {
          cancel();
        }
      }
    };
    ProjectManager.getInstance().addProjectManagerListener(project, myListener);
    Disposer.register(this, new Disposable() {
      @Override
      public void dispose() {
        ProjectManager.getInstance().removeProjectManagerListener(project, myListener);
      }
    });
  }
  setOwnerTask(info);
  setProcessId(info.getProcessId());
  myOption = option;
  myInfo = info;
  setTitle(info.getTitle());
  final Project nonDefaultProject = project == null || project.isDisposed() ? null : project.isDefault() ? null : project;
  final IdeFrame frame = ((WindowManagerEx)WindowManager.getInstance()).findFrameFor(nonDefaultProject);
  myStatusBar = frame != null ? (StatusBarEx)frame.getStatusBar() : null;
  myBackgrounded = shouldStartInBackground();
  if (myBackgrounded) {
    doBackground();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:BackgroundableProcessIndicator.java

示例2: showDescriptionInStatusBar

import com.intellij.openapi.wm.IdeFrame; //导入方法依赖的package包/类
public static void showDescriptionInStatusBar(boolean isIncluded, Component component, String description) {
  IdeFrame frame = component instanceof IdeFrame
                   ? (IdeFrame)component
                   : (IdeFrame)SwingUtilities.getAncestorOfClass(IdeFrame.class, component);
  StatusBar statusBar;
  if (frame != null && (statusBar = frame.getStatusBar()) != null) {
    statusBar.setInfo(isIncluded ? description : null);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ActionMenu.java

示例3: getCancellableProcesses

import com.intellij.openapi.wm.IdeFrame; //导入方法依赖的package包/类
@NotNull
private static List<Pair<TaskInfo, ProgressIndicator>> getCancellableProcesses(@Nullable Project project) {
  IdeFrame frame = ((WindowManagerEx)WindowManager.getInstance()).findFrameFor(project);
  StatusBarEx statusBar = frame == null ? null : (StatusBarEx)frame.getStatusBar();
  if (statusBar == null) return Collections.emptyList();

  return ContainerUtil.findAll(statusBar.getBackgroundProcesses(),
                               new Condition<Pair<TaskInfo, ProgressIndicator>>() {
                                 @Override
                                 public boolean value(Pair<TaskInfo, ProgressIndicator> pair) {
                                   return pair.first.isCancellable() && !pair.second.isCanceled();
                                 }
                               });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:StopAction.java


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