Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/OldClient/src/org/litesoft/GWT/forms/client/components/factories/others/UiLabelWidgetFactory.java

Diff revisions: vs.
  @@ -11,25 +11,20 @@
11 11
12 12 import com.google.gwt.user.client.ui.*;
13 13
14 - public class UiLabelWidgetFactory implements FormComponentFactory
15 - {
14 + public class UiLabelWidgetFactory implements FormComponentFactory {
16 15 public Widget create( FormInstanceComponentHandler pComponentHandler, UiDef pUiDef,
17 - FormMetaData pFormMetaData, boolean pHasHorizontalPeer )
18 - {
16 + FormMetaData pFormMetaData, boolean pHasHorizontalPeer ) {
19 17 UiLabelDef zDef = (UiLabelDef) pUiDef;
20 18 LabelMetaData zMD = pFormMetaData.getLabel( zDef );
21 - if ( zMD == null )
22 - {
19 + if ( zMD == null ) {
23 20 throw new IllegalStateException( "Metadata required for a " + zDef );
24 21 }
25 22 return ApplyFont.to( zDef.getFont(), createLabel( zDef, zMD ) );
26 23 }
27 24
28 - protected Widget createLabel( UiLabelDef pDef, LabelMetaData pMD )
29 - {
25 + protected Widget createLabel( UiLabelDef pDef, LabelMetaData pMD ) {
30 26 String text = Strings.normalizeNewLines( pMD.getExternalText() );
31 - if ( -1 == text.indexOf( '\n') )
32 - {
27 + if ( -1 == text.indexOf( '\n' ) ) {
33 28 return new Label( text );
34 29 }
35 30 String html = null; // todo: translate: UtilsGwt.HTMLize( text );