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


Java AppIconScheme类代码示例

本文整理汇总了Java中com.intellij.openapi.wm.AppIconScheme的典型用法代码示例。如果您正苦于以下问题:Java AppIconScheme类的具体用法?Java AppIconScheme怎么用?Java AppIconScheme使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: _setProgress

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
@Override
public boolean _setProgress(IdeFrame frame, Object processId, AppIconScheme.Progress scheme, double value, boolean isOk) {
  myCurrentProcessId = processId;

  if (Math.abs(myLastValue - value) < 0.02d) {
    return true;
  }

  try {
    if (isValid(frame)) {
      Win7TaskBar.setProgress(frame, value, isOk);
    }
  }
  catch (Throwable e) {
    LOG.error(e);
  }

  myLastValue = value;
  myCurrentProcessId = null;
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:AppIcon.java

示例2: showIconProgress

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
public static void showIconProgress(Project project, int n, final int maximum, final int problemsCounter, boolean updateWithAttention) {
  AppIcon icon = AppIcon.getInstance();
  if (n < maximum || !updateWithAttention) {
    if (!updateWithAttention || icon.setProgress(project, TESTS, AppIconScheme.Progress.TESTS, (double)n / (double)maximum, problemsCounter == 0)) {
      if (problemsCounter > 0) {
        icon.setErrorBadge(project, String.valueOf(problemsCounter));
      }
    }
  } else {
    if (icon.hideProgress(project, TESTS)) {
      if (problemsCounter > 0) {
        icon.setErrorBadge(project, String.valueOf(problemsCounter));
        icon.requestAttention(project, false);
      } else {
        icon.setOkBadge(project, true);
        icon.requestAttention(project, false);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:TestsUIUtil.java

示例3: showIconProgress

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
public static void showIconProgress(Project project, int n, final int maximum, final int problemsCounter) {
  AppIcon icon = AppIcon.getInstance();
  if (n < maximum) {
    if (icon.setProgress(project, TESTS, AppIconScheme.Progress.TESTS, (double)n / (double)maximum, problemsCounter == 0)) {
      if (problemsCounter > 0) {
        icon.setErrorBadge(project, String.valueOf(problemsCounter));
      }
    }
  } else {
    if (icon.hideProgress(project, TESTS)) {
      if (problemsCounter > 0) {
        icon.setErrorBadge(project, String.valueOf(problemsCounter));
        icon.requestAttention(project, false);
      } else {
        icon.setOkBadge(project, true);
        icon.requestAttention(project, false);
      }
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:TestsUIUtil.java

示例4: showIconProgress

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
public static void showIconProgress(Project project, int n, final int maximum, final int problemsCounter, boolean updateWithAttention) {
  AppIcon icon = AppIcon.getInstance();
  if (n < maximum || !updateWithAttention) {
    if (!updateWithAttention || icon.setProgress(project, TESTS, AppIconScheme.Progress.TESTS, (double)n / (double)maximum, problemsCounter == 0)) {
      if (problemsCounter > 0) {
        icon.setErrorBadge(project, String.valueOf(problemsCounter));
      }
    }
  }
  else {
    if (icon.hideProgress(project, TESTS)) {
      if (problemsCounter > 0) {
        icon.setErrorBadge(project, String.valueOf(problemsCounter));
        icon.requestAttention(project, false);
      }
      else {
        icon.setOkBadge(project, true);
        icon.requestAttention(project, false);
      }
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:TestsUIUtil.java

示例5: setFraction

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
@Override
public void setFraction(final double fraction) {
  if (fraction - lastFraction < 0.01d) return;
  lastFraction = fraction;
  UIUtil.invokeLaterIfNeeded(new Runnable() {
    @Override
    public void run() {
      AppIcon.getInstance().setProgress(myProject, "indexUpdate", AppIconScheme.Progress.INDEXING, fraction, true);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DumbServiceImpl.java

示例6: setProgress

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
@Override
public final boolean setProgress(Project project, Object processId, AppIconScheme.Progress scheme, double value, boolean isOk) {
  if (!isAppActive() && Registry.is("ide.appIcon.progress") && (myCurrentProcessId == null || myCurrentProcessId.equals(processId))) {
    return _setProgress(getIdeFrame(project), processId, scheme, value, isOk);
  }
  else {
    return false;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AppIcon.java

示例7: setFraction

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
@Override
public void setFraction(final double fraction) {
  if (fraction - lastFraction < 0.01d) return;
  lastFraction = fraction;
  UIUtil.invokeLaterIfNeeded(
          () -> AppIcon.getInstance().setProgress(myProject, "indexUpdate", AppIconScheme.Progress.INDEXING, fraction, true));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:DumbServiceImpl.java

示例8: setProgress

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
@Override
public boolean setProgress(Project project, Object o, AppIconScheme.Progress progress, double v, boolean isOk) {
    AnyBarConnector.setImage(AnyBarImage.YELLOW, getHost(), getPort());
    return delegate.setProgress(project, o, progress, v, isOk);
}
 
开发者ID:denofevil,项目名称:AnyBarIdea,代码行数:6,代码来源:AnyBarConnector.java

示例9: addIndicatorDelegate

import com.intellij.openapi.wm.AppIconScheme; //导入依赖的package包/类
private void addIndicatorDelegate() {
  ProgressIndicator indicator = myIndicator;
  if (!(indicator instanceof ProgressIndicatorEx)) return;
  ((ProgressIndicatorEx)indicator).addStateDelegate(new AbstractProgressIndicatorExBase() {

    @Override
    public void cancel() {
      super.cancel();
      closeUI();
      stopAppIconProgress();
    }

    @Override
    public void stop() {
      super.stop();
      if (!isCanceled()) {
        closeUI();
      }
      stopAppIconProgress();
    }

    private void stopAppIconProgress() {
      UIUtil.invokeLaterIfNeeded(new Runnable() {
        @Override
        public void run() {
          AppIcon appIcon = AppIcon.getInstance();
          if (appIcon.hideProgress(myProject, APP_ICON_ID)) {
            if (myErrorCount > 0) {
              appIcon.setErrorBadge(myProject, String.valueOf(myErrorCount));
              appIcon.requestAttention(myProject, true);
            }
            else if (!myCompilationStartedAutomatically) {
              appIcon.setOkBadge(myProject, true);
              appIcon.requestAttention(myProject, false);
            }
          }
        }
      });
    }
    @Override
    public void setFraction(final double fraction) {
      super.setFraction(fraction);
      UIUtil.invokeLaterIfNeeded(new Runnable() {
        @Override
        public void run() {
          AppIcon.getInstance().setProgress(myProject, APP_ICON_ID, AppIconScheme.Progress.BUILD, fraction, true);
        }
      });
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:52,代码来源:CompilerTask.java


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