Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/GWT_Sandbox/MultiModule/foundation/src/org/litesoft/sandbox/multimodule/foundation/client/support/PlacesSupport.java

Diff revisions: vs.
  @@ -1,32 +1,32 @@
1 - package org.litesoft.sandbox.multimodule.foundation.client.support;
2 -
3 - import org.litesoft.sandbox.multimodule.foundation.client.*;
4 - import org.litesoft.sandbox.multimodule.foundation.client.places.*;
5 -
6 - import com.google.gwt.place.shared.*;
7 -
8 - public class PlacesSupport {
9 - public static Place createPlace( Places pPlace, Long pLuckyId ) {
10 - switch ( pPlace ) {
11 - default:
12 - case Home:
13 - return new HomePlace();
14 - case Front:
15 - return new FrontPlace( pLuckyId );
16 - case Back:
17 - return new BackPlace( pLuckyId );
18 - case Left:
19 - return new LeftPlace( pLuckyId );
20 - case Right:
21 - return new RightPlace( pLuckyId );
22 - case Top:
23 - return new TopPlace( pLuckyId );
24 - case Bottom:
25 - return new BottomPlace( pLuckyId );
26 - }
27 - }
28 -
29 - public static Places deNull( Long pOrdinal, Places pDefault ) {
30 - return (pOrdinal == null) ? pDefault : Places.fromOrdinal( pOrdinal.intValue() );
31 - }
32 - }
1 + package org.litesoft.sandbox.multimodule.foundation.client.support;
2 +
3 + import org.litesoft.sandbox.multimodule.foundation.client.*;
4 + import org.litesoft.sandbox.multimodule.foundation.client.places.*;
5 +
6 + import com.google.gwt.place.shared.*;
7 +
8 + public class PlacesSupport {
9 + public static Place createPlace( Places pPlace, Long pLuckyId ) {
10 + switch ( pPlace ) {
11 + default:
12 + case Home:
13 + return new HomePlace();
14 + case Front:
15 + return new FrontPlace( pLuckyId );
16 + case Back:
17 + return new BackPlace( pLuckyId );
18 + case Left:
19 + return new LeftPlace( pLuckyId );
20 + case Right:
21 + return new RightPlace( pLuckyId );
22 + case Top:
23 + return new TopPlace( pLuckyId );
24 + case Bottom:
25 + return new BottomPlace( pLuckyId );
26 + }
27 + }
28 +
29 + public static Places deNull( Long pOrdinal, Places pDefault ) {
30 + return (pOrdinal == null) ? pDefault : Places.fromOrdinal( pOrdinal.intValue() );
31 + }
32 + }