litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/ImageCellButton.java
|
@@ -7,19 +7,16 @@ |
7 |
7 |
|
import com.google.gwt.dom.client.*; |
8 |
8 |
|
import com.google.gwt.user.client.*; |
9 |
9 |
|
|
10 |
|
- |
public class ImageCellButton extends AbstractCellButton |
11 |
|
- |
{ |
|
10 |
+ |
public class ImageCellButton extends AbstractCellButton { |
12 |
11 |
|
private String mImageRef; |
13 |
12 |
|
|
14 |
|
- |
public ImageCellButton( DefButtonNamedTypedFactoryImage pDefButtonFactory, int pMinimumCellSize ) |
15 |
|
- |
{ |
|
13 |
+ |
public ImageCellButton( DefButtonNamedTypedFactoryImage pDefButtonFactory, int pMinimumCellSize ) { |
16 |
14 |
|
super( 0, pDefButtonFactory, 0, "Image", // |
17 |
15 |
|
pMinimumCellSize, createElement( pDefButtonFactory.getButtonImageRef() ) ); |
18 |
16 |
|
prefetchImageButtonImages( mImageRef = pDefButtonFactory.getButtonImageRef() ); |
19 |
17 |
|
} |
20 |
18 |
|
|
21 |
|
- |
private static Element createElement( String pButtonImageRef ) |
22 |
|
- |
{ |
|
19 |
+ |
private static Element createElement( String pButtonImageRef ) { |
23 |
20 |
|
Element zElement = DOM.createImg(); |
24 |
21 |
|
zElement.setPropertyString( "src", buildImageButtonImageURL( pButtonImageRef, true ) ); |
25 |
22 |
|
ImageElement.as( zElement ).setAlt( pButtonImageRef ); |
|
@@ -27,12 +24,10 @@ |
27 |
24 |
|
} |
28 |
25 |
|
|
29 |
26 |
|
@Override |
30 |
|
- |
public void setEnabled( boolean pEnabled ) |
31 |
|
- |
{ |
|
27 |
+ |
public void setEnabled( boolean pEnabled ) { |
32 |
28 |
|
boolean zUpdateSource = isEnabled() != pEnabled; |
33 |
29 |
|
super.setEnabled( pEnabled ); |
34 |
|
- |
if ( zUpdateSource ) |
35 |
|
- |
{ |
|
30 |
+ |
if ( zUpdateSource ) { |
36 |
31 |
|
mInnerElement.setPropertyString( "src", buildImageButtonImageURL( mImageRef, pEnabled ) ); |
37 |
32 |
|
} |
38 |
33 |
|
} |