Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/nonpublic/BothStretchableAdjustor.java

Diff revisions: vs.
  @@ -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 BothStretchableAdjustor implements StretchabilityAdjustor {
9 - public static final StretchabilityAdjustor INSTANCE = new BothStretchableAdjustor();
10 -
11 - @Override
12 - public Widget adjustStretchability( Widget pWidget ) {
13 - if ( pWidget instanceof ISizeableWidget ) {
14 - ISizeableWidget zSizeable = (ISizeableWidget) pWidget;
15 - if ( zSizeable.getHeightHelper().isStretchable() && zSizeable.getWidthHelper().isStretchable() ) {
16 - return pWidget;
17 - }
18 - }
19 - return new SizeableSimplePanel( true, pWidget ).stretchable();
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 BothStretchableAdjustor implements StretchabilityAdjustor {
9 + public static final StretchabilityAdjustor INSTANCE = new BothStretchableAdjustor();
10 +
11 + @Override
12 + public Widget adjustStretchability( Widget pWidget ) {
13 + if ( pWidget instanceof ISizeableWidget ) {
14 + ISizeableWidget zSizeable = (ISizeableWidget) pWidget;
15 + if ( zSizeable.getHeightHelper().isStretchable() && zSizeable.getWidthHelper().isStretchable() ) {
16 + return pWidget;
17 + }
18 + }
19 + return new SizeableSimplePanel( true, pWidget ).stretchable();
20 + }
21 + }