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
60
61
62
63
package org.litesoft.sandbox.multimodule.groupfront.client.right;

import org.litesoft.sandbox.infrastructure.client.widgets.*;
import org.litesoft.sandbox.multimodule.foundation.client.*;
import org.litesoft.sandbox.multimodule.foundation.client.support.*;
import org.litesoft.sandbox.multimodule.foundation.client.widgets.*;

import com.google.gwt.event.dom.client.*;
import com.google.gwt.user.client.ui.*;

public class RightViewImpl implements RightView,
                                      FaceSwitcher
{
    private final DieRotator mDieRotator = new DieRotator( this );
    private final Places mCenter = Places.Right;
    private final Widget mAsWidget;
    private Presenter mPresenter;
    private Long mLuckyId;

    public RightViewImpl()
    {
        String zSection = "FrontGroup";
        VerticalPanel zPanel = new VerticalPanel();
        zPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
        zPanel.add( new HelpWidget( zSection, "" + mCenter ) );
        zPanel.add( new Label( "" + mCenter ) );
        zPanel.add( mDieRotator );
        zPanel.add( new Button( "Feeling Lucky", new ClickHandler()
        {
            @Override
            public void onClick( ClickEvent event )
            {
                switchTo( PlacesSupport.deNull( mLuckyId, mCenter.getOppositeFace() ) );
            }
        } ) );
        zPanel.add( new HelpWidget( zSection, "Lucky" ) );
        mAsWidget = zPanel;
    }

    @Override
    public void setPresenter( Presenter pPresenter )
    {
        mDieRotator.setDie( (mPresenter = pPresenter).getDie() );
    }

    @Override
    public void setLuckyId( Long pLuckyId )
    {
        mLuckyId = pLuckyId;
    }

    @Override
    public Widget asWidget()
    {
        return mAsWidget;
    }

    @Override
    public void switchTo( Places pPlace )
    {
        mPresenter.goTo( PlacesSupport.createPlace( pPlace, (long) mCenter.getOppositeFace().ordinal() ) );
    }
}

Commits for litesoft/trunk/GWT_Sandbox/MultiModule/groupFront/src/org/litesoft/sandbox/multimodule/groupfront/client/right/RightViewImpl.java

Diff revisions: vs.
Revision Author Commited Message
540 Diff Diff GeorgeS picture GeorgeS Mon 03 Oct, 2011 04:22:28 +0000
538 Diff Diff GeorgeS picture GeorgeS Sun 02 Oct, 2011 22:14:59 +0000
514 Diff Diff GeorgeS picture GeorgeS Thu 22 Sep, 2011 06:07:01 +0000
508 Diff Diff GeorgeS picture GeorgeS Sun 18 Sep, 2011 16:39:39 +0000

More progress on Multi

507 GeorgeS picture GeorgeS Thu 15 Sep, 2011 14:00:27 +0000