litesoft
@ 948
litesoft / trunk / GWT_Sandbox / MultiModule / main / src / org / litesoft / sandbox / multimodule / main / client / 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 72 |
package org.litesoft.sandbox.multimodule.main.client.home; import org.litesoft.sandbox.infrastructure.client.*; import org.litesoft.sandbox.multimodule.foundation.client.*; import org.litesoft.sandbox.multimodule.foundation.client.support.*; import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.ui.*; import java.util.*; public class HomeViewImpl implements HomeView, FaceSwitcher { private final List<Widget> mButtons = new ArrayList<Widget>(); private final Widget mAsWidget; private Presenter mPresenter; public HomeViewImpl() { Grid zPanel = new Grid( 4, 3 ) { @Override protected void onAttach() { super.onAttach(); SameSize.these( mButtons ); } }; zPanel.setCellSpacing( 5 ); zPanel.setWidget( 0, 1, createButton( Places.Top ) ); zPanel.setWidget( 1, 0, createButton( Places.Left ) ); zPanel.setWidget( 1, 1, createButton( Places.Front ) ); zPanel.setWidget( 1, 2, createButton( Places.Right ) ); zPanel.setWidget( 2, 1, createButton( Places.Bottom ) ); zPanel.setWidget( 3, 1, createButton( Places.Back ) ); mAsWidget = zPanel; } private Widget createButton( final Places pPlaceId ) { Button zButton = new Button( pPlaceId.name(), new ClickHandler() { @Override public void onClick( ClickEvent event ) { switchTo( pPlaceId ); } } ); mButtons.add( zButton ); return zButton; } @Override public void setPresenter( Presenter pPresenter ) { mPresenter = pPresenter; } @Override public Widget asWidget() { return mAsWidget; } @Override public void switchTo( Places pPlace ) { mPresenter.goTo( PlacesSupport.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/MultiModule/main/src/org/litesoft/sandbox/multimodule/main/client/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 |
939 Diff | GeorgeS | Mon 02 Jun, 2014 21:30:31 +0000 | Extracting commonfoundation |
587 Diff | GeorgeS | Fri 02 Dec, 2011 11:55:12 +0000 | Accordion... |
552 Diff | GeorgeS | Tue 11 Oct, 2011 04:01:56 +0000 | |
548 | GeorgeS | Mon 10 Oct, 2011 19:08:21 +0000 |