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
59
package org.litesoft.GWT.client.pavsupport;

import org.litesoft.commonfoundation.base.*;

import com.google.gwt.place.shared.*;
import com.google.gwt.user.client.ui.*;

/**
 * Simple Activity implementation that is always willing to stop, and does
 * nothing onStop and onCancel.
 */
public abstract class AbstractActivity<View extends AbstractView> implements Activity,
                                                                             AbstractPresenter {
    protected final View mView;
    protected final PlaceChanger mPlaceChanger;

    public AbstractActivity( View pView, PlaceChanger pPlaceChanger ) {
        mView = Confirm.isNotNull( "View", pView );
        mPlaceChanger = Confirm.isNotNull( "PlaceChanger", pPlaceChanger );
    }

    @SuppressWarnings("unchecked")
    @Override
    public final void start( AcceptsOneWidget pPanel ) {
        start();
        mView.setPresenter( this );
        pPanel.setWidget( mView );
    }

    @Override
    public Place getWhere() {
        return mPlaceChanger.getWhere();
    }

    @Override
    public void goBack() {
        mPlaceChanger.goBack();
    }

    @Override
    public PlaceChanger.GoToPlace goForwardTo( Place pNewPlace ) {
        return mPlaceChanger.goForwardTo( pNewPlace );
    }

    abstract protected void start();

    @Override
    public String mayStop() {
        return null;
    }

    @Override
    public void onCancel() {
    }

    @Override
    public void onStop() {
    }
}

Commits for litesoft/trunk/Java/GWT/Client/src/org/litesoft/GWT/client/pavsupport/AbstractActivity.java

Diff revisions: vs.
Revision Author Commited Message
950 Diff Diff GeorgeS picture GeorgeS Thu 19 Jun, 2014 17:57:04 +0000

New Lines

948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

939 Diff Diff GeorgeS picture GeorgeS Mon 02 Jun, 2014 21:30:31 +0000

Extracting commonfoundation

804 Diff Diff GeorgeS picture GeorgeS Wed 15 Aug, 2012 12:48:51 +0000
737 Diff Diff GeorgeS picture GeorgeS Sun 24 Jun, 2012 16:36:32 +0000

!

720 Diff Diff GeorgeS picture GeorgeS Sun 10 Jun, 2012 16:20:42 +0000
712 GeorgeS picture GeorgeS Sat 09 Jun, 2012 22:46:04 +0000

Move PAV stuff into LiteSoft