litesoft
@ 950
litesoft / trunk / GWT_Sandbox / MultiModule / groupFront / src / org / litesoft / sandbox / multimodule / groupfront / client / right / RightViewImpl.java
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 64 65 66 67 68 69 70 71 72 |
package org.litesoft.sandbox.multimodule.groupfront.client.right; import org.litesoft.sandbox.infrastructure.client.*; 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( UtilsGwt.horizontal( new Label( "" + mCenter ), new Spacer().width( 10 ), new HelpWidget( zSection, "" + mCenter ) ) ); zPanel.add( mDieRotator ); zPanel.add( UtilsGwt.horizontal( new Spacer().width( 50 ), // new Button( "Home", createHomeClickHandler() ), // new Spacer().width( 220 ), // new HelpWidget( zSection, "Lucky" ), // new Spacer().width( 10 ), // new Button( "Feeling Lucky", createFeelingLuckyClickHandler() ) ) ); mAsWidget = zPanel; } private ClickHandler createHomeClickHandler() { return new ClickHandler() { @Override public void onClick( ClickEvent event ) { switchTo( Places.Home ); } }; } private ClickHandler createFeelingLuckyClickHandler() { return new ClickHandler() { @Override public void onClick( ClickEvent event ) { switchTo( PlacesSupport.deNull( mLuckyId, mCenter.getOppositeFace() ) ); } }; } @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
Revision | Author | Commited | Message |
---|---|---|---|
950 Diff | GeorgeS | Thu 19 Jun, 2014 17:57:04 +0000 | New Lines |
948 Diff | GeorgeS | Sat 07 Jun, 2014 23:42:39 +0000 | Jusefuls Formatter Updated to New Code Format |
552 Diff | GeorgeS | Tue 11 Oct, 2011 04:01:56 +0000 | |
540 Diff | GeorgeS | Mon 03 Oct, 2011 04:22:28 +0000 | |
538 Diff | GeorgeS | Sun 02 Oct, 2011 22:14:59 +0000 | |
514 Diff | GeorgeS | Thu 22 Sep, 2011 06:07:01 +0000 | |
508 Diff | GeorgeS | Sun 18 Sep, 2011 16:39:39 +0000 | More progress on Multi |
507 | GeorgeS | Thu 15 Sep, 2011 14:00:27 +0000 |