Subversion Repository Public Repository

litesoft

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

Diff revisions: vs.
  @@ -11,43 +11,33 @@
11 11
12 12 import com.google.gwt.user.client.ui.*;
13 13
14 - public class UiImageWidgetFactory implements FormComponentFactory
15 - {
14 + public class UiImageWidgetFactory implements FormComponentFactory {
16 15 public Widget create( FormInstanceComponentHandler pComponentHandler, UiDef pUiDef,
17 - FormMetaData pFormMetaData, boolean pHasHorizontalPeer )
18 - {
16 + FormMetaData pFormMetaData, boolean pHasHorizontalPeer ) {
19 17 UiImageDef zDef = (UiImageDef) pUiDef;
20 18 String imageID = zDef.getImageID();
21 - if ( !imageID.startsWith( "http://" ) && !imageID.startsWith( "https://" ) )
22 - {
19 + if ( !imageID.startsWith( "http://" ) && !imageID.startsWith( "https://" ) ) {
23 20 imageID = "formImages" + (imageID.startsWith( "/" ) ? imageID : "/" + imageID);
24 21 }
25 22 Widget zRV;
26 23 Integer zWidth = zDef.getWidth();
27 24 Integer zHeight = zDef.getHeight();
28 - if ( (zWidth == null) || (zHeight == null) )
29 - {
25 + if ( (zWidth == null) || (zHeight == null) ) {
30 26 SizeableImage rv = new SizeableImage( imageID );
31 - if ( FloodX.YES.equals( zDef.getFloodX() ) )
32 - {
27 + if ( FloodX.YES.equals( zDef.getFloodX() ) ) {
33 28 rv.stretchableHorizontally();
34 29 }
35 - if ( FloodY.YES.equals( zDef.getFloodY() ) )
36 - {
30 + if ( FloodY.YES.equals( zDef.getFloodY() ) ) {
37 31 rv.stretchableVertically();
38 32 }
39 33 zRV = rv;
40 - }
41 - else
42 - {
34 + } else {
43 35 zRV = new OurImage( imageID );
44 36 }
45 - if ( zWidth != null )
46 - {
37 + if ( zWidth != null ) {
47 38 zRV.setWidth( zWidth.toString() );
48 39 }
49 - if ( zHeight != null )
50 - {
40 + if ( zHeight != null ) {
51 41 zRV.setHeight( zHeight.toString() );
52 42 }
53 43 return zRV;