litesoft
Diff Revisions
750
vs
751
for /trunk/mobileGWT/mgwtPlus/src/org/litesoft/mgwt/client/pavsupport/AbstractBackableViewImpl.java
|
@@ -10,6 +10,7 @@ |
10 |
10 |
|
import org.litesoft.mgwt.client.*; |
11 |
11 |
|
|
12 |
12 |
|
import com.google.gwt.dom.client.*; |
|
13 |
+ |
import com.google.gwt.safehtml.shared.*; |
13 |
14 |
|
import com.google.gwt.user.client.ui.*; |
14 |
15 |
|
import com.googlecode.mgwt.dom.client.event.tap.*; |
15 |
16 |
|
import com.googlecode.mgwt.ui.client.*; |
|
@@ -112,14 +113,23 @@ |
112 |
113 |
|
|
113 |
114 |
|
// Common Content Types |
114 |
115 |
|
|
115 |
|
- |
protected Panel createContentFlowPanel() |
|
116 |
+ |
protected Panel createContentFlowPanel( Widget... pWidgets ) |
116 |
117 |
|
{ |
117 |
118 |
|
FlowPanel zPanel = new FlowPanel(); |
118 |
119 |
|
zPanel.getElement().getStyle().setMarginTop( 20, Style.Unit.PX ); |
119 |
120 |
|
|
120 |
121 |
|
setContent( zPanel ); |
121 |
122 |
|
|
122 |
|
- |
return zPanel; |
|
123 |
+ |
return addTo( zPanel, pWidgets ); |
|
124 |
+ |
} |
|
125 |
+ |
|
|
126 |
+ |
protected Panel createContentRoundPanel( Widget... pWidgets ) |
|
127 |
+ |
{ |
|
128 |
+ |
Panel zPanel = new RoundPanel(); |
|
129 |
+ |
|
|
130 |
+ |
setContent( zPanel ); |
|
131 |
+ |
|
|
132 |
+ |
return addTo( zPanel, pWidgets ); |
123 |
133 |
|
} |
124 |
134 |
|
|
125 |
135 |
|
protected <T> OptionList<T> createContentOptionList( final SelectedListener<T> pSelectedListener ) |
|
@@ -169,17 +179,42 @@ |
169 |
179 |
|
WidgetList zList = new WidgetList(); |
170 |
180 |
|
zList.setRound( true ); |
171 |
181 |
|
|
|
182 |
+ |
return addTo( zList, pWidgets ); |
|
183 |
+ |
} |
|
184 |
+ |
|
|
185 |
+ |
protected <T extends HasWidgets> T addTo( T pPanel, Widget... pWidgets ) |
|
186 |
+ |
{ |
172 |
187 |
|
if ( pWidgets != null ) |
173 |
188 |
|
{ |
174 |
189 |
|
for ( Widget zWidget : pWidgets ) |
175 |
190 |
|
{ |
176 |
191 |
|
if ( zWidget != null ) |
177 |
192 |
|
{ |
178 |
|
- |
zList.add( zWidget ); |
|
193 |
+ |
pPanel.add( zWidget ); |
179 |
194 |
|
} |
180 |
195 |
|
} |
181 |
196 |
|
} |
182 |
|
- |
return zList; |
|
197 |
+ |
return pPanel; |
|
198 |
+ |
} |
|
199 |
+ |
|
|
200 |
+ |
protected Widget createLabel( E13nData pE13nData ) |
|
201 |
+ |
{ |
|
202 |
+ |
return createLabel( makeSafeHtml( getResolver().resolve( UtilsCommon.assertNotNull( "Label E13nData", pE13nData ) ) ) ); |
|
203 |
+ |
} |
|
204 |
+ |
|
|
205 |
+ |
protected Widget createLabel( String pLabelTextCode ) |
|
206 |
+ |
{ |
|
207 |
+ |
return createLabel( makeSafeHtml( getResolver().resolve( UtilsCommon.assertNotNullNotEmpty( "Label Text Code", pLabelTextCode ) ) ) ); |
|
208 |
+ |
} |
|
209 |
+ |
|
|
210 |
+ |
protected Widget createLabel( SafeHtml pSafeHtml ) |
|
211 |
+ |
{ |
|
212 |
+ |
return new HTML( UtilsCommon.assertNotNull( "Label SafeHtml", pSafeHtml ) ); |
|
213 |
+ |
} |
|
214 |
+ |
|
|
215 |
+ |
protected SafeHtml makeSafeHtml( String pText ) |
|
216 |
+ |
{ |
|
217 |
+ |
return new OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml( HTMLize.escape( pText ) ); |
183 |
218 |
|
} |
184 |
219 |
|
|
185 |
220 |
|
protected Widget withPlaceHolder( HasPlaceHolder pWidget, String pPlaceHolderTextCode ) |