本文整理了Java中com.google.gwt.core.client.Scheduler.scheduleFinally()
方法的一些代码示例,展示了Scheduler.scheduleFinally()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scheduler.scheduleFinally()
方法的具体详情如下:
包路径:com.google.gwt.core.client.Scheduler
类名称:Scheduler
方法名:scheduleFinally
[英]A "finally" command will be executed before GWT-generated code returns control to the browser's event loop. The RepeatingCommand#execute()method will be called once per exit to the event loop until false
is returned. This type of command is appropriate for instrumentation or cleanup code.
If a finally command schedules another finally command, the second command will be executed before control flow returns to the browser.
[中]
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Schedules the command.
*
* <p>
* Protected so that subclasses can override to use an alternative scheduler.
* </p>
*
* @param command the command to execute
*/
protected void scheduleFinally(ScheduledCommand command) {
Scheduler.get().scheduleFinally(command);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private static void schedule() {
if (!needsInjection) {
needsInjection = true;
Scheduler.get().scheduleFinally(flusher);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Schedules a layout. The duration and callback passed to this method will
* supercede any previous call that has not yet been executed.
*
* @param duration
* @param callback
*/
public void schedule(int duration, AnimationCallback callback) {
this.duration = duration;
this.callback = callback;
canceled = false;
if (!scheduled) {
scheduled = true;
Scheduler.get().scheduleFinally(this);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Schedules a {@link SelectionChangeEvent} to fire at the
* end of the current event loop.
*/
protected void scheduleSelectionChangeEvent() {
setEventCancelled(false);
if (!isEventScheduled()) {
setEventScheduled(true);
Scheduler.get().scheduleFinally(new ScheduledCommand() {
public void execute() {
setEventScheduled(false);
if (isEventCancelled()) {
setEventCancelled(false);
return;
}
fireSelectionChangeEvent();
}
});
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Returns a mutable {@link RequestContext} and enqueues the given receiver to
* be called as though it had been passed directly to
* {@link RequestContext#fire(Receiver)}.
*/
public C get(Receiver<Void> receiver) {
if (openContext == null) {
openContext = createContext(requestFactory);
openContextImpl = (AbstractRequestContext) openContext;
openContextImpl.setFireDisabled(true);
getScheduler().scheduleFinally(new ScheduledCommand() {
@Override
public void execute() {
assert !openContextImpl.isLocked() : "AbstractRequestContext.fire() should have been a no-op";
openContextImpl.setFireDisabled(false);
openContext.fire();
openContext = null;
openContextImpl = null;
}
});
}
if (receiver != null) {
// Queue a final callback receiver
openContextImpl.fire(receiver);
}
return openContext;
}
代码示例来源:origin: com.ahome-it/lienzo-core
@Override
protected final void tick()
{
if (m_refire)
{
m_refire = false;
Scheduler.get().scheduleFinally(m_action);
}
}
代码示例来源:origin: fr.lteconsulting/hexa.rpc
private void checkAnswersToGive()
{
if( fCallbackingScheduled )
return;
fCallbackingScheduled = true;
Scheduler.get().scheduleFinally( checkResults );
}
代码示例来源:origin: ltearno/hexa.tools
private void checkAnswersToGive()
{
if( fCallbackingScheduled )
return;
fCallbackingScheduled = true;
Scheduler.get().scheduleFinally( checkResults );
}
代码示例来源:origin: mstahv/v-leaflet
@Override
protected void extend(final ServerConnector target) {
// non tree updates in V7 :(, map might not exist when this is called
Scheduler.get().scheduleFinally(new ScheduledCommand() {
@Override
public void execute() {
getMap().addControl(getControl());
}
});
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-ui
/**
* Set focus to current window. Current method is not intended to be called by user. Service
* method used by {@link WindowManager} to control the focus between window switch.
*/
protected final void focus() {
Scheduler.get().scheduleFinally(this::doFocus);
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Schedules the command.
*
* <p>
* Protected so that subclasses can override to use an alternative scheduler.
* </p>
*
* @param command the command to execute
*/
protected void scheduleFinally(ScheduledCommand command) {
Scheduler.get().scheduleFinally(command);
}
代码示例来源:origin: geogebra/geogebra
private static void schedule() {
if (!needsInjection) {
needsInjection = true;
Scheduler.get().scheduleFinally(flusher);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
Scheduler.get().scheduleFinally(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl
@Override
public void onElementResize(ElementResizeEvent e) {
if(!alreadyLayouted) {
NavigationBarConnector.this.getWidget().avoidCaptionOverlap();
Scheduler.get().scheduleFinally(doResetLayouting);
alreadyLayouted = true;
}
}
};
代码示例来源:origin: apache/incubator-wave
public void testScheduleThenCancelSchedules() {
target.schedule();
target.cancel();
verify(scheduler).scheduleFinally(target);
verifyNoMoreInteractions(scheduler);
}
代码示例来源:origin: SwellRT/swellrt
public void testScheduleIsIdempotent() {
target.schedule();
target.schedule();
verify(scheduler).scheduleFinally(target);
verifyNoMoreInteractions(scheduler);
}
代码示例来源:origin: apache/incubator-wave
public void testScheduleIsIdempotent() {
target.schedule();
target.schedule();
verify(scheduler).scheduleFinally(target);
verifyNoMoreInteractions(scheduler);
}
代码示例来源:origin: SwellRT/swellrt
public void testScheduleAfterCancelDoesNotReschedule() {
target.schedule();
target.cancel();
target.schedule();
verify(scheduler).scheduleFinally(target);
verifyNoMoreInteractions(scheduler);
}
代码示例来源:origin: apache/incubator-wave
public void testScheduleAfterPassDoesReschedule() {
target.schedule();
target.cancel();
target.execute();
target.schedule();
verify(scheduler, times(2)).scheduleFinally(target);
verifyNoMoreInteractions(scheduler);
}
代码示例来源:origin: org.kie.guvnor/guvnor-guided-dtable-editor-client
public void onDeleteRow( DeleteRowEvent event ) {
model.getData().remove( event.getIndex() );
model.getAnalysisData().remove( event.getIndex() );
Scheduler.get().scheduleFinally( new Command() {
public void execute() {
updateSystemControlledColumnValues();
}
} );
//Log deletion of row
model.getAuditLog().add( new DeleteRowAuditLogEntry( identity.getName(),
event.getIndex() ) );
}
内容来源于网络,如有侵权,请联系作者删除!