Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/TransparentImageSpacer.java

Diff revisions: vs.
  @@ -5,13 +5,11 @@
5 5
6 6 import com.google.gwt.user.client.*;
7 7
8 - public class TransparentImageSpacer extends AbstractBrowserEventListenableWidget
9 - {
8 + public class TransparentImageSpacer extends AbstractBrowserEventListenableWidget {
10 9 private String mHeightSet = null;
11 10 private String mWidthSet = null;
12 11
13 - public TransparentImageSpacer( int pWidthAndHeight )
14 - {
12 + public TransparentImageSpacer( int pWidthAndHeight ) {
15 13 setElement( DOM.createImg() );
16 14 CommonElementHelper.setImgSrc( getElement(), TransparentImage.URL );
17 15 //noinspection GWTStyleCheck
  @@ -21,19 +19,16 @@
21 19 height( pWidthAndHeight );
22 20 }
23 21
24 - public TransparentImageSpacer()
25 - {
22 + public TransparentImageSpacer() {
26 23 this( 1 );
27 24 }
28 25
29 26 /**
30 27 * Calling this method eliminates the ability to set width via css class
31 28 */
32 - public TransparentImageSpacer width( int pPixels )
33 - {
29 + public TransparentImageSpacer width( int pPixels ) {
34 30 String newWidth = "" + pPixels;
35 - if ( !newWidth.equals( mWidthSet ) )
36 - {
31 + if ( !newWidth.equals( mWidthSet ) ) {
37 32 setWidth( mWidthSet = newWidth );
38 33 }
39 34 return (mHeightSet != null) ? this : height( 1 );
  @@ -42,18 +37,15 @@
42 37 /**
43 38 * Calling this method eliminates the ability to set height via css class
44 39 */
45 - public TransparentImageSpacer height( int pPixels )
46 - {
40 + public TransparentImageSpacer height( int pPixels ) {
47 41 String newHeight = "" + pPixels;
48 - if ( !newHeight.equals( mHeightSet ) )
49 - {
42 + if ( !newHeight.equals( mHeightSet ) ) {
50 43 setHeight( mHeightSet = newHeight );
51 44 }
52 45 return (mWidthSet != null) ? this : width( 1 );
53 46 }
54 47
55 - public TransparentImageSpacer style( String pStyle )
56 - {
48 + public TransparentImageSpacer style( String pStyle ) {
57 49 addStyleName( pStyle );
58 50 return this;
59 51 }