litesoft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
package com.temp.client.foundation.pavment;
import com.temp.client.foundation.pavment.PlaceChanger.GoToPlace;
import com.google.gwt.place.shared.Place;
/**
* Simple Activity implementation that is always willing to stop, and does
* nothing onStop and onCancel.
*/
public abstract class AbstractActivity implements Activity, ForcedPlaceChanger
{
private final PlaceChanger placeChanger;
public AbstractActivity(PlaceChanger placeChanger) {
this.placeChanger = placeChanger;
}
@Override
public final void goTo(Place place) {
GoToPlace response = placeChanger.goTo(place);
if (response != null) {
switch (response) {
case AlreadyThere:
refresh();
break;
default: // Huh?
break;
case NoActivity: // should have been Notified by PAM
break;
case CurrentActivityRejectedLeaving: // should have been notified by current activity
break;
}
}
}
/**
* Returns the current place.
*
* @return a {@link Place} instance
*/
@Override
public final Place getWhere() {
return placeChanger.getWhere();
}
@Override
public String mayStop()
{
return null;
}
@Override
public void onCancel()
{
}
@Override
public void onStop()
{
}
}
|
Revision |
Author |
Commited |
Message |
626
|
GeorgeS
|
Wed 11 Apr, 2012 19:39:41 +0000 |
|