本文整理匯總了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);