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 Window.ClosingEvent

    java.lang.Object
      com.google.gwt.event.shared.GwtEvent<Window.ClosingHandler>
          com.google.gwt.user.client.Window.ClosingEvent

Enclosing class:
  Window

    public static class Window.ClosingEvent

extends GwtEvent<Window.ClosingHandler>

Fired just before the browser window closes or navigates to a different site.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
`GwtEvent.Type<H>`

Constructor Summary
`Window.ClosingEvent()`

Method Summary
`protected void` | `dispatch(Window.ClosingHandler handler)` Should only be called by `HandlerManager`.
`GwtEvent.Type<Window.ClosingHandler>` | `getAssociatedType()` Returns the type used to register this event.
`java.lang.String` | `getMessage()` Get the message that will be presented to the user in a confirmation dialog that asks the user whether or not she wishes to navigate away from the page.
`void` | `setMessage(java.lang.String message)` Set the message to a `non-null` value to present a confirmation dialog that asks the user whether or not she wishes to navigate away from the page.

Methods inherited from class com.google.gwt.event.shared.GwtEvent
`assertLive, getSource, isLive, kill, revive, toDebugString, toString`

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

Constructor Detail

### Window.ClosingEvent

    public Window.ClosingEvent()

Method Detail

### getAssociatedType

    public final GwtEvent.Type<Window.ClosingHandler> getAssociatedType()

  Description copied from class: `GwtEvent`
  Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

  Specified by:
    `getAssociatedType` in class `GwtEvent<Window.ClosingHandler>`
  Returns:
    the type

### getMessage

    public java.lang.String getMessage()

  Get the message that will be presented to the user in a confirmation dialog that asks the user whether or not she wishes to navigate away from the page.

  Returns:
    the message to display to the user, or null

### setMessage

    public void setMessage(java.lang.String message)

  Set the message to a `non-null` value to present a confirmation dialog that asks the user whether or not she wishes to navigate away from the page. If multiple handlers set the message, the last message will be displayed; all others will be ignored.

  Parameters:
    `message` - the message to display to the user, or null

### dispatch

    protected void dispatch(Window.ClosingHandler handler)

  Description copied from class: `GwtEvent`
  Should only be called by `HandlerManager`. In other words, do not use or call.

  Specified by:
    `dispatch` in class `GwtEvent<Window.ClosingHandler>`
  Parameters:
    `handler` - handler

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