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
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Deprecated.As of release 1.4, replaced byaddCommand(Command)
static void
addCommand
(Command cmd) Deprecated.Enqueues aCommand
to be fired after all current events have been handled.static void
Deprecated.Enqueues anIncrementalCommand
to be fired after all current events have been handled.static void
addPause()
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 aCommand
to 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 aCommand
to be fired after all current events have been handled. Note that theCommand
should not perform any blocking operations.- Parameters:
cmd
- the command to be fired- Throws:
NullPointerException
- if cmd isnull
-
addCommand
Deprecated.Enqueues anIncrementalCommand
to be fired after all current events have been handled. Note that theIncrementalCommand
should 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 ofDeferredCommand
s. AnyDeferredCommand
s 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.