本文整理汇总了Java中com.google.gwt.core.client.Scheduler.ScheduledCommand方法的典型用法代码示例。如果您正苦于以下问题:Java Scheduler.ScheduledCommand方法的具体用法?Java Scheduler.ScheduledCommand怎么用?Java Scheduler.ScheduledCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.core.client.Scheduler
的用法示例。
在下文中一共展示了Scheduler.ScheduledCommand方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: applySelectionCommand
import com.google.gwt.core.client.Scheduler; //导入方法依赖的package包/类
@Override
protected void applySelectionCommand(final Scheduler.ScheduledCommand command) {
if (!doubleClickMode || doubleClickHandling) {
super.applySelectionCommand(command);
} else {
Scheduler.get().scheduleFixedDelay(new Scheduler.RepeatingCommand() {
private long scheduledTimestamp = System.currentTimeMillis();
@Override
public boolean execute() {
if (!doubleClickHandling && lastDoubleClickHandled < scheduledTimestamp) {
command.execute();
}
return false;
}
}, 250);
}
}
示例2: performItemCommand
import com.google.gwt.core.client.Scheduler; //导入方法依赖的package包/类
protected void performItemCommand(final SuggestionItem item) {
selectedSuggestion = item;
Scheduler.ScheduledCommand cmd = item.getScheduledCommand();
if (cmd != null) {
FocusImpl.getFocusImplForPanel().blur(getElement());
Scheduler.get().scheduleFinally(cmd);
}
}
示例3: getScheduledCommand
import com.google.gwt.core.client.Scheduler; //导入方法依赖的package包/类
public Scheduler.ScheduledCommand getScheduledCommand() {
return cmd;
}
示例4: setScheduledCommand
import com.google.gwt.core.client.Scheduler; //导入方法依赖的package包/类
public void setScheduledCommand(Scheduler.ScheduledCommand cmd) {
this.cmd = cmd;
}
示例5: scheduleDeferred
import com.google.gwt.core.client.Scheduler; //导入方法依赖的package包/类
void scheduleDeferred(final Scheduler.ScheduledCommand scheduledCommand) {
Scheduler.get().scheduleDeferred(scheduledCommand);
}
示例6: testOnResize
import com.google.gwt.core.client.Scheduler; //导入方法依赖的package包/类
@Test
public void testOnResize() {
final ArgumentCaptor<Scheduler.ScheduledCommand> scheduledCommand = ArgumentCaptor.forClass(Scheduler.ScheduledCommand.class);
doNothing().when(gridLienzoPanel).updatePanelSize();
doNothing().when(gridLienzoPanel).refreshScrollPosition();
doNothing().when(gridLienzoPanel).scheduleDeferred(scheduledCommand.capture());
gridLienzoPanel.onResize();
scheduledCommand.getValue().execute();
verify(gridLienzoPanel).updatePanelSize();
verify(gridLienzoPanel).refreshScrollPosition();
}