litesoft
@ 151
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt package org.litesoft.GWT.client.widgets.nonpublic; import org.litesoft.GWT.client.widgets.*; import com.google.gwt.user.client.ui.*; public class WidthStretchableAdjustor implements StretchabilityAdjustor { public static final StretchabilityAdjustor INSTANCE = new WidthStretchableAdjustor(); @Override public Widget adjustStretchability( Widget pWidget ) { return isStretchable( pWidget ) ? // pWidget : // new SizeableSimplePanel( true, pWidget ).stretchableHorizontally(); } public static boolean isStretchable( Widget pWidget ) { return (pWidget instanceof ISizeableWidget) && ((ISizeableWidget) pWidget).getWidthHelper().isStretchable(); } } |