本文整理汇总了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();
}
}
示例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);
}
}
示例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();
}
});
}