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

import org.litesoft.sandbox.multimodule.client.common.pavsupport.*;
import org.litesoft.sandbox.multimodule.client.common.util.*;
import org.litesoft.sandbox.multimodule.client.common.widgets.*;
import org.litesoft.sandbox.multimodule.client.foundation.places.*;
import org.litesoft.sandbox.multimodule.client.foundation.support.*;
import org.litesoft.sandbox.multimodule.client.main.home.*;

import com.google.gwt.core.client.*;
import com.google.gwt.user.client.ui.*;

/**
 * Entry point classes define <code>onModuleLoad()</code>
 */
public class Main implements EntryPoint
{
    @Override
    public void onModuleLoad()
    {
        System.out.println( "Main.onModuleLoad" );

        ActivityFactoryRegistry.register( new CachedViewSynchronousActivityFactory<ClientFactory, HomeView, PlaceHome>( EnumPlaces.Home )
        {
            @Override
            public HomeView createView()
            {
                return new HomeViewImpl();
            }

            @Override
            public Activity createActivity( ClientFactory pCommonActivityParam, HomeView pView, PlaceHome pPlace )
            {
                return new HomeActivity( pCommonActivityParam, pView, pPlace );
            }
        } );

        OurLabel zMessageUserSinkLabel = new OurLabel();
        SimplePanel zAppWidget = new SimplePanel();

        RootPanel.get( "CenteredContent" ).add( zAppWidget );
        RootPanel.get( "Message" ).add( zMessageUserSinkLabel );

        ClientFactoryImpl clientFactory = new ClientFactoryImpl(); // GWT.create( ClientFactory.class );
        PlaceChangerWithCurrentUrlSupport pam = new PlaceActivityManager<ClientFactory>( zAppWidget, clientFactory );
        clientFactory.setPlaceChanger( pam );
        clientFactory.setMessageUserSink( new StyledSafeTextMessageUserSink( zMessageUserSinkLabel ) );

        // Goes to the place represented on URL else default place
        pam.goToCurrentUrl();
    }
}

Commits for litesoft/trunk/GWT_Sandbox/MultiModuleSingleSrc/main/src/org/litesoft/sandbox/multimodule/client/main/Main.java

Diff revisions: vs.
Revision Author Commited Message
669 Diff Diff GeorgeS picture GeorgeS Sun 13 May, 2012 23:29:27 +0000
584 GeorgeS picture GeorgeS Fri 18 Nov, 2011 17:53:52 +0000