Package com.google.gwt.user.client
Class Window.ClosingEvent
java.lang.Object
com.google.web.bindery.event.shared.Event<Window.ClosingHandler>
com.google.gwt.event.shared.GwtEvent<Window.ClosingHandler>
com.google.gwt.user.client.Window.ClosingEvent
- Enclosing class:
Window
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddispatch(Window.ClosingHandler handler) Should only be called byHandlerManager.Returns theEvent.Typeused to register this event, allowing anEventBusto find handlers of the appropriate class.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.(package private) static GwtEvent.Type<Window.ClosingHandler> getType()voidsetMessage(String message) Set the message to anon-nullvalue 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, reviveMethods inherited from class com.google.web.bindery.event.shared.Event
setSource, toDebugString, toString
-
Constructor Details
-
ClosingEvent
public ClosingEvent()
-
-
Method Details
-
getType
-
getAssociatedType
Description copied from class:EventReturns theEvent.Typeused to register this event, allowing anEventBusto find handlers of the appropriate class.- Specified by:
getAssociatedTypein classGwtEvent<Window.ClosingHandler>- Returns:
- the type
-
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
Set the message to anon-nullvalue 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
Description copied from class:GwtEventShould only be called byHandlerManager. In other words, do not use or call.- Specified by:
dispatchin classGwtEvent<Window.ClosingHandler>- Parameters:
handler- handler- See Also:
-