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