public static class

Window.ClosingEvent

extends GwtEvent<H extends EventHandler>
java.lang.Object
   ↳ com.google.gwt.event.shared.GwtEvent<H extends com.google.gwt.event.shared.EventHandler>
     ↳ com.google.gwt.user.client.Window.ClosingEvent

Class Overview

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

Summary

Public Constructors
Window.ClosingEvent()
Public Methods
final Type<Window.ClosingHandler> getAssociatedType()
Returns the type used to register this event.
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(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.
Protected Methods
void dispatch(Window.ClosingHandler handler)
Should only be called by HandlerManager.
[Expand]
Inherited Methods
From class com.google.gwt.event.shared.GwtEvent
From class java.lang.Object

Public Constructors

public Window.ClosingEvent ()

Public Methods

public final Type<Window.ClosingHandler> getAssociatedType ()

Returns the type used to register this event. Used by handler manager to dispatch events to the correct handlers.

Returns
  • the type

public 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

public void setMessage (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

Protected Methods

protected void dispatch (Window.ClosingHandler handler)

Should only be called by HandlerManager. In other words, do not use or call.

Parameters
handler handler