![Subversion Repository Subversion Repository](/static/media/svn.jpg?v=9.37)
![Public Repository Public Repository](/static/media/public.png?v=9.37)
litesoft
@ 538
litesoft / trunk / GWT_Sandbox / MultiModule / groupBack / src / org / litesoft / sandbox / multimodule / groupback / client / bottom / BottomViewImpl.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 |
package org.litesoft.sandbox.multimodule.groupback.client.bottom; import org.litesoft.sandbox.multimodule.common.client.*; import org.litesoft.sandbox.multimodule.common.client.support.*; import org.litesoft.sandbox.multimodule.common.client.widgets.*; import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.ui.*; public class BottomViewImpl implements BottomView, FaceSwitcher { private final Places mCenter; private final Widget mAsWidget; private Presenter mPresenter; private Long mLuckyId; public BottomViewImpl() { DieRotator zCubeFace = new DieRotator( this, "BottomGroup", mCenter = Places.Bottom ); VerticalPanel zPanel = new VerticalPanel(); zPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER ); zPanel.add( zCubeFace ); zPanel.add( new Button( "Feeling Lucky", new ClickHandler() { @Override public void onClick( ClickEvent event ) { switchTo( PlacesSupport.deNull( mLuckyId, mCenter.getOppositeFace() ) ); } } ) ); mAsWidget = zPanel; } @Override public void setPresenter( Presenter pPresenter ) { mPresenter = pPresenter; } @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() ) ); } } |