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