litesoft
Diff Revisions
947
vs
948
for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/OurSizedImage.java
|
@@ -1,9 +1,8 @@ |
1 |
1 |
|
package com.temp.client.foundation.widget; |
2 |
2 |
|
|
3 |
|
- |
import com.temp.shared.utils.StringUtils; |
4 |
|
- |
|
5 |
|
- |
import com.google.gwt.dom.client.ImageElement; |
6 |
|
- |
import com.google.gwt.user.client.ui.Image; |
|
3 |
+ |
import com.google.gwt.dom.client.*; |
|
4 |
+ |
import com.google.gwt.user.client.ui.*; |
|
5 |
+ |
import com.temp.shared.utils.*; |
7 |
6 |
|
|
8 |
7 |
|
/** |
9 |
8 |
|
* Convenience Class to allow for Image resizing and styling in-line |
|
@@ -15,30 +14,30 @@ |
15 |
14 |
|
public OurSizedImage() { |
16 |
15 |
|
} |
17 |
16 |
|
|
18 |
|
- |
public OurSizedImage(String url) { |
19 |
|
- |
super(url); |
|
17 |
+ |
public OurSizedImage( String url ) { |
|
18 |
+ |
super( url ); |
20 |
19 |
|
} |
21 |
20 |
|
|
22 |
|
- |
public OurSizedImage style(String className) { |
23 |
|
- |
if (null != (className = StringUtils.noEmpty(className))) { |
24 |
|
- |
addStyleName(className); |
|
21 |
+ |
public OurSizedImage style( String className ) { |
|
22 |
+ |
if ( null != (className = StringUtils.noEmpty( className )) ) { |
|
23 |
+ |
addStyleName( className ); |
25 |
24 |
|
} |
26 |
25 |
|
return this; |
27 |
26 |
|
} |
28 |
27 |
|
|
29 |
|
- |
public OurSizedImage size(int width, int height) { |
30 |
|
- |
width(width); |
31 |
|
- |
height(height); |
|
28 |
+ |
public OurSizedImage size( int width, int height ) { |
|
29 |
+ |
width( width ); |
|
30 |
+ |
height( height ); |
32 |
31 |
|
return this; |
33 |
32 |
|
} |
34 |
33 |
|
|
35 |
|
- |
public OurSizedImage width(int size) { |
36 |
|
- |
getImageElement().setWidth(size); |
|
34 |
+ |
public OurSizedImage width( int size ) { |
|
35 |
+ |
getImageElement().setWidth( size ); |
37 |
36 |
|
return this; |
38 |
37 |
|
} |
39 |
38 |
|
|
40 |
|
- |
public OurSizedImage height(int size) { |
41 |
|
- |
getImageElement().setHeight(size); |
|
39 |
+ |
public OurSizedImage height( int size ) { |
|
40 |
+ |
getImageElement().setHeight( size ); |
42 |
41 |
|
return this; |
43 |
42 |
|
} |
44 |
43 |
|
|