litesoft
Diff Revisions
133
vs
142
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/DefButtonNamedTypedFactoryText.java
|
@@ -2,17 +2,16 @@ |
2 |
2 |
|
|
3 |
3 |
|
import org.litesoft.core.util.*; |
4 |
4 |
|
|
5 |
|
- |
import com.google.gwt.event.dom.client.*; |
6 |
|
- |
|
7 |
5 |
|
public class DefButtonNamedTypedFactoryText extends DefButtonNamedTypedFactory |
8 |
6 |
|
{ |
9 |
7 |
|
private String mText; |
10 |
|
- |
private int mPreImageWidth,mPostImageWidth; // initialized to 0 |
|
8 |
+ |
private DefButtonNamedTypedAbstractTextable mTextType; |
11 |
9 |
|
|
12 |
|
- |
public DefButtonNamedTypedFactoryText( DefButtonNamedTyped pTyped, String pText ) |
|
10 |
+ |
public DefButtonNamedTypedFactoryText( DefButtonNamedTypedAbstractTextable pTyped, String pText ) |
13 |
11 |
|
{ |
14 |
12 |
|
super( pTyped, Form.Text ); |
15 |
13 |
|
mText = UtilsCommon.noEmpty( pText ); |
|
14 |
+ |
mTextType = pTyped; |
16 |
15 |
|
} |
17 |
16 |
|
|
18 |
17 |
|
@Override |
|
@@ -26,25 +25,28 @@ |
26 |
25 |
|
return (mText != null) ? mText : getName(); |
27 |
26 |
|
} |
28 |
27 |
|
|
29 |
|
- |
public int getPreImageWidth() |
|
28 |
+ |
public int minimumCellSize() |
30 |
29 |
|
{ |
31 |
|
- |
return mPreImageWidth; |
|
30 |
+ |
return mTextType.minimumCellSize(); |
32 |
31 |
|
} |
33 |
32 |
|
|
34 |
|
- |
public DefButtonNamedTypedFactoryText preImageWidth( int pPreImageWidth ) |
|
33 |
+ |
public boolean wrapText() |
35 |
34 |
|
{ |
36 |
|
- |
mPreImageWidth = pPreImageWidth; |
37 |
|
- |
return this; |
|
35 |
+ |
return mTextType.wrapText(); |
38 |
36 |
|
} |
39 |
37 |
|
|
40 |
|
- |
public int getPostImageWidth() |
|
38 |
+ |
public String getSize() |
|
39 |
+ |
{ |
|
40 |
+ |
return mTextType.getSize(); |
|
41 |
+ |
} |
|
42 |
+ |
|
|
43 |
+ |
public int getPreImageWidth() |
41 |
44 |
|
{ |
42 |
|
- |
return mPostImageWidth; |
|
45 |
+ |
return mTextType.getPreImageWidth(); |
43 |
46 |
|
} |
44 |
47 |
|
|
45 |
|
- |
public DefButtonNamedTypedFactoryText postImageWidth( int pPostImageWidth ) |
|
48 |
+ |
public int getPostImageWidth() |
46 |
49 |
|
{ |
47 |
|
- |
mPostImageWidth = pPostImageWidth; |
48 |
|
- |
return this; |
|
50 |
+ |
return mTextType.getPostImageWidth(); |
49 |
51 |
|
} |
50 |
52 |
|
} |