本文整理汇总了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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例6: getValidationThreadToUse
import com.intellij.util.Alarm; //导入方法依赖的package包/类
@NotNull
protected Alarm.ThreadToUse getValidationThreadToUse() {
return Alarm.ThreadToUse.SWING_THREAD;
}
示例7: createAlarm
import com.intellij.util.Alarm; //导入方法依赖的package包/类
protected Alarm createAlarm(@NotNull Alarm.ThreadToUse thread, Disposable parent) {
return AlarmFactory.getInstance().create(thread, parent);
}
示例8: TimedDeadzone
import com.intellij.util.Alarm; //导入方法依赖的package包/类
public TimedDeadzone(Length zoneLength, Alarm.ThreadToUse thread) {
myLength = zoneLength;
myAlarm = new Alarm(thread);
}
示例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);
}
示例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);
}
示例11: createAlarm
import com.intellij.util.Alarm; //导入方法依赖的package包/类
protected Alarm createAlarm(@NotNull Alarm.ThreadToUse thread, Disposable parent) {
return new Alarm(thread, parent);
}
示例12: getValidationThreadToUse
import com.intellij.util.Alarm; //导入方法依赖的package包/类
@Nonnull
protected Alarm.ThreadToUse getValidationThreadToUse() {
return Alarm.ThreadToUse.SWING_THREAD;
}
示例13: createAlarm
import com.intellij.util.Alarm; //导入方法依赖的package包/类
protected Alarm createAlarm(@Nonnull Alarm.ThreadToUse thread, Disposable parent) {
return new Alarm(thread, parent);
}