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


Java Alarm.ThreadToUse方法代码示例

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


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

示例1: AbstractTreeUpdater

import com.intellij.util.Alarm; //导入方法依赖的package包/类
public AbstractTreeUpdater(@NotNull AbstractTreeBuilder treeBuilder) {
  myTreeBuilder = treeBuilder;
  final JTree tree = myTreeBuilder.getTree();
  final JComponent component = tree instanceof TreeTableTree ? ((TreeTableTree)tree).getTreeTable() : tree;
  myUpdateQueue = new MergingUpdateQueue("UpdateQueue", 300, component.isShowing(), component) {
    @Override
    protected Alarm createAlarm(@NotNull Alarm.ThreadToUse thread, Disposable parent) {
      return new Alarm(thread, parent) {
        @Override
        protected boolean isEdt() {
          return AbstractTreeUpdater.this.isEdt();
        }
      };
    }
  };
  myUpdateQueue.setRestartTimerOnAdd(false);

  final UiNotifyConnector uiNotifyConnector = new UiNotifyConnector(component, myUpdateQueue);
  Disposer.register(this, myUpdateQueue);
  Disposer.register(this, uiNotifyConnector);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:AbstractTreeUpdater.java

示例2: MergingUpdateQueue

import com.intellij.util.Alarm; //导入方法依赖的package包/类
public MergingUpdateQueue(@NonNls String name,
                          int mergingTimeSpan,
                          boolean isActive,
                          @Nullable JComponent modalityStateComponent,
                          @Nullable Disposable parent,
                          @Nullable JComponent activationComponent,
                          @NotNull Alarm.ThreadToUse thread) {
  myMergingTimeSpan = mergingTimeSpan;
  myModalityStateComponent = modalityStateComponent;
  myName = name;
  myPassThrough = ApplicationManager.getApplication().isUnitTestMode();
  myExecuteInDispatchThread = thread == Alarm.ThreadToUse.SWING_THREAD;
  myWaiterForMerge = createAlarm(thread, myExecuteInDispatchThread ? null : this);

  if (isActive) {
    showNotify();
  }

  if (parent != null) {
    Disposer.register(parent, this);
  }

  if (activationComponent != null) {
    setActivationComponent(activationComponent);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:MergingUpdateQueue.java

示例3: MergingUpdateQueue

import com.intellij.util.Alarm; //导入方法依赖的package包/类
public MergingUpdateQueue(@NonNls String name,
                          int mergingTimeSpan,
                          boolean isActive,
                          @Nullable JComponent modalityStateComponent,
                          @Nullable Disposable parent,
                          @Nullable JComponent activationComponent,
                          @Nonnull Alarm.ThreadToUse thread) {
  myMergingTimeSpan = mergingTimeSpan;
  myModalityStateComponent = modalityStateComponent;
  myName = name;
  myPassThrough = ApplicationManager.getApplication().isUnitTestMode();
  myExecuteInDispatchThread = thread == Alarm.ThreadToUse.SWING_THREAD;
  myWaiterForMerge = createAlarm(thread, myExecuteInDispatchThread ? null : this);

  if (isActive) {
    showNotify();
  }

  if (parent != null) {
    Disposer.register(parent, this);
  }

  if (activationComponent != null) {
    setActivationComponent(activationComponent);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:27,代码来源:MergingUpdateQueue.java

示例4: AbstractTreeUpdater

import com.intellij.util.Alarm; //导入方法依赖的package包/类
public AbstractTreeUpdater(@Nonnull AbstractTreeBuilder treeBuilder) {
  myTreeBuilder = treeBuilder;
  final JTree tree = myTreeBuilder.getTree();
  final JComponent component = tree instanceof TreeTableTree ? ((TreeTableTree)tree).getTreeTable() : tree;
  myUpdateQueue = new MergingUpdateQueue("UpdateQueue", 100, component.isShowing(), component) {
    @Override
    protected Alarm createAlarm(@Nonnull Alarm.ThreadToUse thread, Disposable parent) {
      return new Alarm(thread, parent) {
        @Override
        protected boolean isEdt() {
          return AbstractTreeUpdater.this.isEdt();
        }
      };
    }
  };
  myUpdateQueue.setRestartTimerOnAdd(false);

  final UiNotifyConnector uiNotifyConnector = new UiNotifyConnector(component, myUpdateQueue);
  Disposer.register(this, myUpdateQueue);
  Disposer.register(this, uiNotifyConnector);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:AbstractTreeUpdater.java

示例5: MergingUpdateQueue

import com.intellij.util.Alarm; //导入方法依赖的package包/类
public MergingUpdateQueue(@NonNls @NotNull String name,
                          int mergingTimeSpan,
                          boolean isActive,
                          @Nullable JComponent modalityStateComponent,
                          @Nullable Disposable parent,
                          @Nullable JComponent activationComponent,
                          @NotNull Alarm.ThreadToUse thread) {
  myMergingTimeSpan = mergingTimeSpan;
  myModalityStateComponent = modalityStateComponent;
  myName = name;
  Application app = ApplicationManager.getApplication();
  myPassThrough = app == null || app.isUnitTestMode();
  myExecuteInDispatchThread = thread == Alarm.ThreadToUse.SWING_THREAD;

  if (parent != null) {
    Disposer.register(parent, this);
  }

  myWaiterForMerge = createAlarm(thread, myExecuteInDispatchThread ? null : this);

  if (isActive) {
    showNotify();
  }

  if (activationComponent != null) {
    setActivationComponent(activationComponent);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:MergingUpdateQueue.java

示例6: getValidationThreadToUse

import com.intellij.util.Alarm; //导入方法依赖的package包/类
@NotNull
protected Alarm.ThreadToUse getValidationThreadToUse() {
  return Alarm.ThreadToUse.SWING_THREAD;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DialogWrapper.java

示例7: createAlarm

import com.intellij.util.Alarm; //导入方法依赖的package包/类
protected Alarm createAlarm(@NotNull Alarm.ThreadToUse thread, Disposable parent) {
  return AlarmFactory.getInstance().create(thread, parent);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:MergingUpdateQueue.java

示例8: TimedDeadzone

import com.intellij.util.Alarm; //导入方法依赖的package包/类
public TimedDeadzone(Length zoneLength, Alarm.ThreadToUse thread) {
  myLength = zoneLength;
  myAlarm = new Alarm(thread);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TimedDeadzone.java

示例9: ZipperUpdater

import com.intellij.util.Alarm; //导入方法依赖的package包/类
public ZipperUpdater(final int delay, final Alarm.ThreadToUse threadToUse, Disposable parentDisposable) {
  myDelay = delay;
  myThreadToUse = threadToUse;
  myIsEmpty = true;
  myAlarm = new Alarm(threadToUse, parentDisposable);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ZipperUpdater.java

示例10: ConstantZipperUpdater

import com.intellij.util.Alarm; //导入方法依赖的package包/类
public ConstantZipperUpdater(final int delay, final Alarm.ThreadToUse threadToUse, final Disposable parentDisposable,
                             final Runnable runnable) {
  myRunnable = runnable;
  myZipperUpdater = new ZipperUpdater(delay, threadToUse, parentDisposable);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ConstantZipperUpdater.java

示例11: createAlarm

import com.intellij.util.Alarm; //导入方法依赖的package包/类
protected Alarm createAlarm(@NotNull Alarm.ThreadToUse thread, Disposable parent) {
  return new Alarm(thread, parent);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:MergingUpdateQueue.java

示例12: getValidationThreadToUse

import com.intellij.util.Alarm; //导入方法依赖的package包/类
@Nonnull
protected Alarm.ThreadToUse getValidationThreadToUse() {
  return Alarm.ThreadToUse.SWING_THREAD;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:DialogWrapper.java

示例13: createAlarm

import com.intellij.util.Alarm; //导入方法依赖的package包/类
protected Alarm createAlarm(@Nonnull Alarm.ThreadToUse thread, Disposable parent) {
  return new Alarm(thread, parent);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:MergingUpdateQueue.java


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