litesoft
Diff Revisions
948
vs
950
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/nonpublic/HeightStretchableAdjustor.java
|
@@ -1,21 +1,21 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.client.widgets.nonpublic; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.GWT.client.widgets.*; |
5 |
|
- |
|
6 |
|
- |
import com.google.gwt.user.client.ui.*; |
7 |
|
- |
|
8 |
|
- |
public class HeightStretchableAdjustor implements StretchabilityAdjustor { |
9 |
|
- |
public static final StretchabilityAdjustor INSTANCE = new HeightStretchableAdjustor(); |
10 |
|
- |
|
11 |
|
- |
@Override |
12 |
|
- |
public Widget adjustStretchability( Widget pWidget ) { |
13 |
|
- |
return isStretchable( pWidget ) ? // |
14 |
|
- |
pWidget : // |
15 |
|
- |
new SizeableSimplePanel( true, pWidget ).stretchableVertically(); |
16 |
|
- |
} |
17 |
|
- |
|
18 |
|
- |
public static boolean isStretchable( Widget pWidget ) { |
19 |
|
- |
return (pWidget instanceof ISizeableWidget) && ((ISizeableWidget) pWidget).getHeightHelper().isStretchable(); |
20 |
|
- |
} |
21 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.client.widgets.nonpublic; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.GWT.client.widgets.*; |
|
5 |
+ |
|
|
6 |
+ |
import com.google.gwt.user.client.ui.*; |
|
7 |
+ |
|
|
8 |
+ |
public class HeightStretchableAdjustor implements StretchabilityAdjustor { |
|
9 |
+ |
public static final StretchabilityAdjustor INSTANCE = new HeightStretchableAdjustor(); |
|
10 |
+ |
|
|
11 |
+ |
@Override |
|
12 |
+ |
public Widget adjustStretchability( Widget pWidget ) { |
|
13 |
+ |
return isStretchable( pWidget ) ? // |
|
14 |
+ |
pWidget : // |
|
15 |
+ |
new SizeableSimplePanel( true, pWidget ).stretchableVertically(); |
|
16 |
+ |
} |
|
17 |
+ |
|
|
18 |
+ |
public static boolean isStretchable( Widget pWidget ) { |
|
19 |
+ |
return (pWidget instanceof ISizeableWidget) && ((ISizeableWidget) pWidget).getHeightHelper().isStretchable(); |
|
20 |
+ |
} |
|
21 |
+ |
} |