litesoft
Diff Revisions
545
vs
546
for /trunk/GWT_Sandbox/MultiModule/common/src/org/litesoft/sandbox/infrastructure/client/PlaceChanger.java
|
@@ -1,6 +1,5 @@ |
1 |
1 |
|
package org.litesoft.sandbox.infrastructure.client; |
2 |
2 |
|
|
3 |
|
- |
import com.google.gwt.event.shared.*; |
4 |
3 |
|
import com.google.gwt.place.shared.*; |
5 |
4 |
|
import com.google.gwt.user.client.*; |
6 |
5 |
|
|
|
@@ -14,32 +13,6 @@ |
14 |
13 |
|
} |
15 |
14 |
|
|
16 |
15 |
|
/** |
17 |
|
- |
* Optional delegate in charge of Window-related events. Provides nice |
18 |
|
- |
* isolation for unit testing, and allows customization of confirmation |
19 |
|
- |
* handling. |
20 |
|
- |
*/ |
21 |
|
- |
public interface Delegate |
22 |
|
- |
{ |
23 |
|
- |
/** |
24 |
|
- |
* Adds a {@link Window.ClosingHandler} to the Delegate. |
25 |
|
- |
* |
26 |
|
- |
* @param pHandler a {@link Window.ClosingHandler} instance |
27 |
|
- |
* |
28 |
|
- |
* @return a {@link HandlerRegistration} instance |
29 |
|
- |
*/ |
30 |
|
- |
HandlerRegistration addWindowClosingHandler( Window.ClosingHandler pHandler ); |
31 |
|
- |
|
32 |
|
- |
/** |
33 |
|
- |
* Called to confirm a window closing event. |
34 |
|
- |
* |
35 |
|
- |
* @param pMessage a warning message |
36 |
|
- |
* |
37 |
|
- |
* @return true to allow the window closing |
38 |
|
- |
*/ |
39 |
|
- |
boolean confirm( String pMessage ); |
40 |
|
- |
} |
41 |
|
- |
|
42 |
|
- |
/** |
43 |
16 |
|
* Returns the current place. |
44 |
17 |
|
* |
45 |
18 |
|
* @return a {@link Place} instance |
|
@@ -50,7 +23,7 @@ |
50 |
23 |
|
* Request a change to a new place. It is not a given that we'll actually get |
51 |
24 |
|
* there. First a {@link PlaceChangeRequestEvent} will be posted to the |
52 |
25 |
|
* event bus. If any receivers post a warning message to that event, it will |
53 |
|
- |
* be presented to the user via {@link Delegate#confirm(String)} (which is |
|
26 |
+ |
* be presented to the user via {@link WindowClose#confirm(String)} (which is |
54 |
27 |
|
* typically a call to {@link Window#confirm(String)}). If she cancels, the |
55 |
28 |
|
* current location will not change. Otherwise, the location changes and a |
56 |
29 |
|
* {@link PlaceChangeEvent} is posted announcing the new place. |