Package com.google.gwt.user.client
Class DeferredCommand
java.lang.Object
com.google.gwt.user.client.DeferredCommand
Deprecated.
This class allows you to execute code after all currently pending event
handlers have completed, using the
addCommand(Command) or
addCommand(IncrementalCommand) methods. This is useful when you need
to execute code outside of the context of the current stack.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated.As of release 1.4, replaced byaddCommand(Command)static voidaddCommand(Command cmd) Deprecated.Enqueues aCommandto be fired after all current events have been handled.static voidDeprecated.Enqueues anIncrementalCommandto be fired after all current events have been handled.static voidaddPause()Deprecated.with no replacement because the presence of this method causes arbitrary scheduling decisions
-
Constructor Details
-
DeferredCommand
public DeferredCommand()Deprecated.
-
-
Method Details
-
add
Deprecated.As of release 1.4, replaced byaddCommand(Command)Enqueues aCommandto be fired after all current events have been handled.- Parameters:
cmd- the command to be fired. If cmd is null, a "pause" will be inserted into the queue. Any events added after the pause will wait for an additional cycle through the system event loop before executing. Pauses are cumulative.
-
addCommand
Deprecated.Enqueues aCommandto be fired after all current events have been handled. Note that theCommandshould not perform any blocking operations.- Parameters:
cmd- the command to be fired- Throws:
NullPointerException- if cmd isnull
-
addCommand
Deprecated.Enqueues anIncrementalCommandto be fired after all current events have been handled. Note that theIncrementalCommandshould not perform any blocking operations.- Parameters:
cmd- the command to be fired- Throws:
NullPointerException- if cmd isnull
-
addPause
Deprecated.with no replacement because the presence of this method causes arbitrary scheduling decisionsAdds a "pause" to the queue ofDeferredCommands. AnyDeferredCommands or pauses that are added after this pause will wait for an additional cycle through the system event loop before executing.
-
Scheduler.scheduleDeferred()because the static nature of this API prevents effective mocking for JRE-only tests.