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
package org.litesoft.sandbox.infrastructure.client;

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

public abstract class CachedViewSynchronousActivityFactory<CommonActivityParam extends CommonActivityParameter, View extends IsWidget, APlace extends Place>
        implements ActivityFactory.Synchronous<CommonActivityParam, View, APlace> {
    private final String mPlaceID;
    private View mCachedView;

    public CachedViewSynchronousActivityFactory( Object pPlaceID ) {
        mPlaceID = pPlaceID.toString();
    }

    @Override
    public final String getPlaceId() {
        return mPlaceID;
    }

    @Override
    public synchronized final View getView() {
        if ( mCachedView == null ) {
            mCachedView = createView();
        }
        return mCachedView;
    }

    abstract protected View createView();
}

Commits for litesoft/trunk/GWT_Sandbox/MultiModule/common/src/org/litesoft/sandbox/infrastructure/client/CachedViewSynchronousActivityFactory.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

585 Diff Diff GeorgeS picture GeorgeS Fri 18 Nov, 2011 17:55:26 +0000
540 GeorgeS picture GeorgeS Mon 03 Oct, 2011 04:22:28 +0000