litesoft
@ 948
litesoft / trunk / GWT_Sandbox / MultiModuleSingleSrc / main / src / org / litesoft / sandbox / multimodule / client / main / home / HomeViewImpl.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 |
package org.litesoft.sandbox.multimodule.client.main.home; import org.litesoft.GWT.client.pavsupport.*; import org.litesoft.GWT.client.util.*; import org.litesoft.GWT.client.util.externalization.*; import org.litesoft.sandbox.multimodule.client.foundation.places.*; import org.litesoft.sandbox.multimodule.client.foundation.support.*; import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.ui.*; import java.util.*; public class HomeViewImpl extends AbstractViewImpl<HomeView.Presenter> implements HomeView, FaceSwitcher { private final List<Widget> mButtons = new ArrayList<Widget>(); private final Widget mAsWidget; public HomeViewImpl() { Grid zPanel = new Grid( 6, 3 ) { @Override protected void onAttach() { super.onAttach(); SameSize.these( mButtons ); } }; zPanel.setCellSpacing( 5 ); zPanel.setWidget( 0, 1, createButton( EnumPlaces.Top ) ); zPanel.setWidget( 1, 0, createButton( EnumPlaces.Left ) ); zPanel.setWidget( 1, 1, createButton( EnumPlaces.Front ) ); zPanel.setWidget( 1, 2, createButton( EnumPlaces.Right ) ); zPanel.setWidget( 2, 1, createButton( EnumPlaces.Bottom ) ); zPanel.setWidget( 3, 1, createButton( EnumPlaces.Back ) ); zPanel.setWidget( 3, 1, new HTML( " " ) ); zPanel.setWidget( 3, 1, new Label( ExternalizedText.getInstance().get( "Xyzzy", "WTF" ) ) ); mAsWidget = zPanel; } private Widget createButton( final EnumPlaces pPlaceId ) { Button zButton = new Button( pPlaceId.name(), new ClickHandler() { @Override public void onClick( ClickEvent event ) { switchTo( pPlaceId ); } } ); mButtons.add( zButton ); return zButton; } @Override public Widget asWidget() { return mAsWidget; } @Override public void switchTo( EnumPlaces pPlace ) { mPresenter.goForwardTo( EnumPlaces.createPlace( pPlace, null ) ); // System.out.println( "HomeViewImpl.switchTo: " + mSample.locale() ); // System.out.println( " helloWorld: " + mSample.getString( "helloWorld" ) ); // System.out.println( " goodbyeWorld: " + mSample.getString( "goodbyeWorld" ) ); new TextBox().setName( "xxx" ); } // // private Sample mSample = GWT.create( Sample.class ); } |
Commits for litesoft/trunk/GWT_Sandbox/MultiModuleSingleSrc/main/src/org/litesoft/sandbox/multimodule/client/main/home/HomeViewImpl.java
Revision | Author | Commited | Message |
---|---|---|---|
948 Diff | GeorgeS | Sat 07 Jun, 2014 23:42:39 +0000 | Jusefuls Formatter Updated to New Code Format |
778 Diff | GeorgeS | Mon 16 Jul, 2012 00:55:41 +0000 | |
749 Diff | GeorgeS | Fri 06 Jul, 2012 00:11:43 +0000 | |
729 Diff | GeorgeS | Sun 17 Jun, 2012 17:17:32 +0000 | |
713 Diff | GeorgeS | Sat 09 Jun, 2012 22:47:07 +0000 | |
669 | GeorgeS | Sun 13 May, 2012 23:29:27 +0000 |