本文整理汇总了Java中org.waveprotocol.wave.client.scheduler.Scheduler.Task方法的典型用法代码示例。如果您正苦于以下问题:Java Scheduler.Task方法的具体用法?Java Scheduler.Task怎么用?Java Scheduler.Task使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.waveprotocol.wave.client.scheduler.Scheduler
的用法示例。
在下文中一共展示了Scheduler.Task方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TypingExtractor
import org.waveprotocol.wave.client.scheduler.Scheduler; //导入方法依赖的package包/类
TypingExtractor(TypingSink sink, NodeManager manager, TimerService service,
HtmlView filteredHtmlView, ContentView renderedContentView, Repairer repairer,
SelectionSource selectionSource) {
this.sink = sink;
this.manager = manager;
this.selectionSource = selectionSource;
this.timerService = service;
this.filteredHtmlView = filteredHtmlView;
this.renderedContentView = renderedContentView;
this.repairer = repairer;
this.flushCmd = new Scheduler.Task() {
@Override
public void execute() {
flush();
}
};
}
示例2: addItem
import org.waveprotocol.wave.client.scheduler.Scheduler; //导入方法依赖的package包/类
public void addItem(String text, final Scheduler.Task command) {
Element elem = Document.get().createAnchorElement();
elem.setInnerText(text);
DomHelper.registerEventHandler(elem, "click", new JavaScriptEventListener() {
@Override public void onJavaScriptEvent(String name, Event event) {
command.execute();
}
});
element.appendChild(elem);
}
示例3: schedule
import org.waveprotocol.wave.client.scheduler.Scheduler; //导入方法依赖的package包/类
@Override
public void schedule(Scheduler.Task task) {
assertTrue(currentTask == null || currentTask == task);
currentTask = task;
}
示例4: scheduleFinally
import org.waveprotocol.wave.client.scheduler.Scheduler; //导入方法依赖的package包/类
/**
* Use this instead of GWT's scheduler when scheduling a task in the context
* of a single document. The task's execution will be guarded by the
* appropriate setup and teardown behaviour (e.g. ignoring mutations and
* preserving selections).
*
* If a single task is to run in the context of more than one document,
* schedule it separately, but guard the execution of each part that affects
* each document with a call to {@link #beginDeferredMutation()} and
* {@link #endDeferredMutation()}
*
* @param task
*/
void scheduleFinally(Scheduler.Task task);