Subversion Repository Public Repository

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
package com.temp.client.foundation.pavment;

import com.google.gwt.place.shared.*;
import com.temp.client.foundation.pavment.PlaceChanger.*;

/**
 * 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() {
    }
}

Commits for litesoft/trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/pavment/AbstractActivity.java

Diff revisions: vs.
Revision Author Commited Message
948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

626 GeorgeS picture GeorgeS Wed 11 Apr, 2012 19:39:41 +0000