|
@@ -1,46 +1,46 @@ |
1 |
|
- |
package org.litesoft.GWT.client.pavsupport; |
2 |
|
- |
|
3 |
|
- |
import org.litesoft.GWT.client.util.*; |
4 |
|
- |
|
5 |
|
- |
import com.google.gwt.place.shared.*; |
6 |
|
- |
import com.google.gwt.user.client.*; |
7 |
|
- |
|
8 |
|
- |
public interface PlaceChanger { |
9 |
|
- |
enum GoToPlace { |
10 |
|
- |
AlreadyThere, |
11 |
|
- |
NoActivity, |
12 |
|
- |
CurrentActivityRejectedLeaving |
13 |
|
- |
} |
14 |
|
- |
|
15 |
|
- |
/** |
16 |
|
- |
* Returns the current place. |
17 |
|
- |
* |
18 |
|
- |
* @return a {@link Place} instance |
19 |
|
- |
*/ |
20 |
|
- |
Place getWhere(); |
21 |
|
- |
|
22 |
|
- |
/** |
23 |
|
- |
* Request a change to the previous place on the browser's history stack. |
24 |
|
- |
* If there is a previous place on the browser's history stack, the location |
25 |
|
- |
* changes and a {@link PlaceChangeEvent} is posted announcing the previous place. |
26 |
|
- |
*/ |
27 |
|
- |
void goBack(); |
28 |
|
- |
|
29 |
|
- |
/** |
30 |
|
- |
* Request a change to a new place (and if we get there, the resulting URL will |
31 |
|
- |
* become the new top of the History Stack). |
32 |
|
- |
* <p/> |
33 |
|
- |
* It is not a given that we'll actually get there. First a |
34 |
|
- |
* {@link PlaceChangeRequestEvent} will be posted to the event bus. If any |
35 |
|
- |
* receivers post a warning message to that event, it will be presented to |
36 |
|
- |
* the user via {@link WindowClose#confirm(String)} (which is typically a |
37 |
|
- |
* call to {@link Window#confirm(String)}). If she cancels, the current |
38 |
|
- |
* location will not change. Otherwise, the location changes and a |
39 |
|
- |
* {@link PlaceChangeEvent} is posted announcing the new place. |
40 |
|
- |
* |
41 |
|
- |
* @param pNewPlace a {@link Place} instance |
42 |
|
- |
* |
43 |
|
- |
* @return null if going to pNewPlace, !null means NOT going and why |
44 |
|
- |
*/ |
45 |
|
- |
GoToPlace goForwardTo( Place pNewPlace ); |
46 |
|
- |
} |
|
1 |
+ |
package org.litesoft.GWT.client.pavsupport; |
|
2 |
+ |
|
|
3 |
+ |
import org.litesoft.GWT.client.util.*; |
|
4 |
+ |
|
|
5 |
+ |
import com.google.gwt.place.shared.*; |
|
6 |
+ |
import com.google.gwt.user.client.*; |
|
7 |
+ |
|
|
8 |
+ |
public interface PlaceChanger { |
|
9 |
+ |
enum GoToPlace { |
|
10 |
+ |
AlreadyThere, |
|
11 |
+ |
NoActivity, |
|
12 |
+ |
CurrentActivityRejectedLeaving |
|
13 |
+ |
} |
|
14 |
+ |
|
|
15 |
+ |
/** |
|
16 |
+ |
* Returns the current place. |
|
17 |
+ |
* |
|
18 |
+ |
* @return a {@link Place} instance |
|
19 |
+ |
*/ |
|
20 |
+ |
Place getWhere(); |
|
21 |
+ |
|
|
22 |
+ |
/** |
|
23 |
+ |
* Request a change to the previous place on the browser's history stack. |
|
24 |
+ |
* If there is a previous place on the browser's history stack, the location |
|
25 |
+ |
* changes and a {@link PlaceChangeEvent} is posted announcing the previous place. |
|
26 |
+ |
*/ |
|
27 |
+ |
void goBack(); |
|
28 |
+ |
|
|
29 |
+ |
/** |
|
30 |
+ |
* Request a change to a new place (and if we get there, the resulting URL will |
|
31 |
+ |
* become the new top of the History Stack). |
|
32 |
+ |
* <p/> |
|
33 |
+ |
* It is not a given that we'll actually get there. First a |
|
34 |
+ |
* {@link PlaceChangeRequestEvent} will be posted to the event bus. If any |
|
35 |
+ |
* receivers post a warning message to that event, it will be presented to |
|
36 |
+ |
* the user via {@link WindowClose#confirm(String)} (which is typically a |
|
37 |
+ |
* call to {@link Window#confirm(String)}). If she cancels, the current |
|
38 |
+ |
* location will not change. Otherwise, the location changes and a |
|
39 |
+ |
* {@link PlaceChangeEvent} is posted announcing the new place. |
|
40 |
+ |
* |
|
41 |
+ |
* @param pNewPlace a {@link Place} instance |
|
42 |
+ |
* |
|
43 |
+ |
* @return null if going to pNewPlace, !null means NOT going and why |
|
44 |
+ |
*/ |
|
45 |
+ |
GoToPlace goForwardTo( Place pNewPlace ); |
|
46 |
+ |
} |