litesoft
@ 585
litesoft / trunk / GWT_Sandbox / MultiModuleSingleSrc / main / src / org / litesoft / sandbox / multimodule / client / common / widgets / Spacer.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
package org.litesoft.sandbox.multimodule.client.foundation.widgets; import com.google.gwt.dom.client.*; import com.google.gwt.safehtml.shared.*; import com.google.gwt.user.client.ui.*; public class Spacer extends Composite { public Spacer() { HTML zHTML = new HTML( SafeHtmlUtils.fromSafeConstant( " " ) ); zHTML.getElement().getStyle().setOverflow( Style.Overflow.HIDDEN ); initWidget( zHTML ); size( 1, 1 ); } public Spacer size( int width, int height ) { return width( width ).height( height ); } public Spacer width( int width ) { setWidth( width + "px" ); return this; } public Spacer height( int height ) { setHeight( height + "px" ); return this; } } |