litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/nonpublic/AbstractLowLevelSizeableComposite.java
|
@@ -4,23 +4,19 @@ |
4 |
4 |
|
import com.google.gwt.user.client.*; |
5 |
5 |
|
import com.google.gwt.user.client.ui.*; |
6 |
6 |
|
|
7 |
|
- |
public abstract class AbstractLowLevelSizeableComposite extends AbstractSizeableWidget implements WidgetCompositor |
8 |
|
- |
{ |
|
7 |
+ |
public abstract class AbstractLowLevelSizeableComposite extends AbstractSizeableWidget implements WidgetCompositor { |
9 |
8 |
|
private Widget mWidget; |
10 |
9 |
|
|
11 |
10 |
|
@Override |
12 |
|
- |
public Element getElement() |
13 |
|
- |
{ |
14 |
|
- |
if ( mWidget == null ) |
15 |
|
- |
{ |
|
11 |
+ |
public Element getElement() { |
|
12 |
+ |
if ( mWidget == null ) { |
16 |
13 |
|
throw new IllegalStateException( "initWidget() was never called in " + getClass().getName() ); |
17 |
14 |
|
} |
18 |
15 |
|
return super.getElement(); |
19 |
16 |
|
} |
20 |
17 |
|
|
21 |
18 |
|
@Override |
22 |
|
- |
public Widget[] getCompositedWidgets() |
23 |
|
- |
{ |
|
19 |
+ |
public Widget[] getCompositedWidgets() { |
24 |
20 |
|
return new Widget[]{mWidget}; |
25 |
21 |
|
} |
26 |
22 |
|
|
|
@@ -31,11 +27,9 @@ |
31 |
27 |
|
* |
32 |
28 |
|
* @param pWidget the widget to be wrapped |
33 |
29 |
|
*/ |
34 |
|
- |
protected void LLinitWidget( Widget pWidget ) |
35 |
|
- |
{ |
|
30 |
+ |
protected void LLinitWidget( Widget pWidget ) { |
36 |
31 |
|
// Make sure the widget is not being set twice. |
37 |
|
- |
if ( mWidget != null ) |
38 |
|
- |
{ |
|
32 |
+ |
if ( mWidget != null ) { |
39 |
33 |
|
throw new IllegalStateException( "Composite.initWidget() may only be called once." ); |
40 |
34 |
|
} |
41 |
35 |
|
|
|
@@ -52,8 +46,7 @@ |
52 |
46 |
|
} |
53 |
47 |
|
|
54 |
48 |
|
@Override |
55 |
|
- |
protected void onAttach() |
56 |
|
- |
{ |
|
49 |
+ |
protected void onAttach() { |
57 |
50 |
|
super.onAttach(); |
58 |
51 |
|
|
59 |
52 |
|
//noinspection NonJREEmulationClassesInClientCode |
|
@@ -61,16 +54,14 @@ |
61 |
54 |
|
} |
62 |
55 |
|
|
63 |
56 |
|
@Override |
64 |
|
- |
protected void onDetach() |
65 |
|
- |
{ |
|
57 |
+ |
protected void onDetach() { |
66 |
58 |
|
super.onDetach(); |
67 |
59 |
|
|
68 |
60 |
|
//noinspection NonJREEmulationClassesInClientCode |
69 |
61 |
|
BackDoorToWidget.onDetach( mWidget ); // Call onDetach() on behalf of the contained widget. |
70 |
62 |
|
} |
71 |
63 |
|
|
72 |
|
- |
public Widget LLgetWidget() |
73 |
|
- |
{ |
|
64 |
+ |
public Widget LLgetWidget() { |
74 |
65 |
|
return mWidget; |
75 |
66 |
|
} |
76 |
67 |
|
} |