Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.user.client
Class DeferredCommand

    java.lang.Object
      com.google.gwt.user.client.DeferredCommand

    public class DeferredCommand

extends java.lang.Object

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
`DeferredCommand()`

Method Summary
`static void` | `add(Command cmd)` Deprecated. As of release 1.4, replaced by `addCommand(Command)`
`static void` | `addCommand(Command cmd)` Enqueues a `Command` to be fired after all current events have been handled.
`static void` | `addCommand(IncrementalCommand cmd)` Enqueues an `IncrementalCommand` to be fired after all current events have been handled.
`static void` | `addPause()` Adds a "pause" to the queue of `DeferredCommand`s.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DeferredCommand

    public DeferredCommand()

Method Detail

### add

    public static void add(Command cmd)

  Deprecated. As of release 1.4, replaced by `addCommand(Command)`

  Enqueues a `Command` 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

    public static void addCommand(Command cmd)

  Enqueues a `Command` to be fired after all current events have been handled. Note that the `Command` should not perform any blocking operations.

  Parameters:
    `cmd` - the command to be fired
  Throws:
    `java.lang.NullPointerException` - if cmd is `null`

### addCommand

    public static void addCommand(IncrementalCommand cmd)

  Enqueues an `IncrementalCommand` to be fired after all current events have been handled. Note that the `IncrementalCommand` should not perform any blocking operations.

  Parameters:
    `cmd` - the command to be fired
  Throws:
    `java.lang.NullPointerException` - if cmd is `null`

### addPause

    public static void addPause()

  Adds a "pause" to the queue of `DeferredCommand`s. Any `DeferredCommand`s or pauses that are added after this pause will wait for an additional cycle through the system event loop before executing.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD